[Twisted-Python] Twisted server connection loss with Mysql

Andrew Bennetts andrew-twisted at puzzling.org
Wed May 25 05:44:07 MDT 2005


On Wed, May 25, 2005 at 03:50:54PM +0530, Raghul Jagan wrote:
> Dear Friends,
> 
>                       I am using a twisted server to connect the mysql 
> database using "adbapi".When I start my server the connection to the mysql 
> established and the run as a separate thread. Suppose If the database is 
> restarted or there is a response delay, then the twisted server losses the 
> connection and when I tried by quering the database it reports the error 
> giving "Loss in mysql connection".
>                               I also tried  using the twisted 2.0 
> version,but no way it does not connects automatically.
> 
>                  Friends, Please give a solution for this problem.

Pass cp_reconnect=1 to your adbapi.ConnectionPool, and it should reconnect
automatically.

-Andrew.




More information about the Twisted-Python mailing list