Fix for MySQLdb connection death