On Sun, 15 Jul 2007 13:27:30 -0700, Andrey <[EMAIL PROTECTED]> wrote:
hello

i have an xmlrpc daemon running and uses mysql for authorization. I noticed
that the connection will timeout after a period of time.

After investigated in the api, i found the cp_reconnect switch

adbapi.ConnectionPool(DB_DRIVER,cp_reconnect=True, **DB_ARGS)

however, my problem is, although the deamon will reconnect to mysql, it did
raise an error and turn down the first login attempt before automatically
reconnect the timeouted connection

I wonder if this is normal and this switch is intented to raise error before
reconnect?

Yes.  The exception must be propagated to application code, since there is
no general way to determine if the statement which caused the exception was
executed by the server or not.  The application needs to know the exception
occurred so that it can make a decision about whether to re-executed the
failed statement or not.

Jean-Paul

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to