On Thursday 28 December 2006 20:50, Markus Gritsch wrote:
> Well, this would not solve the problem intoduced with SQLObject 0.8.
> An Error 2006 occurres in the following scenario using SQLObject 0.7:
> * My application is running, being connected to the MySQL database.
> * The MySQL service is stopped and restarted.
> * Every query from now on on the already made connection fails with
> the Error 2006.
> * The user can see this in a message box, and reconnect to the
> database which solves the problem.
>
> So the Error 2006 occurrs if the connection to the old server was
> broken.  It does not matter that the MySQL server is already being
> restarted.  Trying it 1000 times as mentioned above would not fix the
> problem.  It would even make it worse, since the user gets no feedback
> about what is wrong. Just a hanging app.

Your problem is that you use a 5.0.x (or newer server) and it no longer 
permits autoreconnecting by default. The client must set a reconnect flag 
when making the connection to signal that it desires this behavior and 
the python mysqldb module doesn't set this flag. If you use debian, I 
submitted a patch to them and the debian python-mysqldb does reconnect 
when a connection is lost.

Else you can patch your python-mysqldb module to set this flag, or you can 
complain to the python-mysqldb authors to find a solution for allowing 
this reconnect flag to be set if needed.

-- 
Dan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to