I've had various problems with persistent MySQL connections in the past, so you might like to make sure your code is dealing with the connections properly.
If you're making a new connection per web request, you should be alright, although that's not terribly efficient. However, if you're using a connection pool (a common technique) then it's important to test that the connection is still active if it's been idle for anything more than a few seconds (in a typical web app this means checking each connection as it's taken from the pool). The MySQL C API provides a
mysql_ping() function for doing this efficiently, and I believe Python's
MySQLdb module exposes this as a
ping() method on the connection object.