List Info

Thread: CP/MySQLdb reports "MySQL server has gone away" but it hasn't !




CP/MySQLdb reports "MySQL server has gone away" but it hasn't !
user name
2006-04-01 13:51:01
> Maybe it would be better to test the actual connection
before returning
> it... Just a thought that crossed my mind. Hmm, I have
just looked on
> the connection from MySQLdb and it doesn't have a
check function... It
> would be pretty useful - like having an
isConnectionOpen method or
> something similar.

Yeah, that would be pretty convenient. I had an idea to
extend the pool
to give me a cursor object directly if I wanted, that way
the pool
could have a try-except where it tries to get a cursor from
the pooled
connection, and if it fails just makes a new connection
first.
Something like that anyway..maybe there are some practical
reasons why
this is a bad idea, but I can't think of any right now 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )