Open pataelmo opened 9 years ago
The root of this issue is that in the main loop we're periodically pinging the database to keep the connection alive. Which is an issue because when the server becomes unavailable the MySQLdb.ping function which is used to check the connection blocks until it can get an answer back, sometimes indefinitely. This stops the main loop from checking cards and/or doing anything else useful. Need to find another solution or hide this code in a thread to make it not block the main loop.
The code doesn't properly handle the remote database connection being slow nor not available. This may need to be dealt with threads or just better handling of code and setting shorter timeouts (if available)