Added CONN_MAX_AGE setting to 7hrs to avoid 'database has gone away' errors with MySQL default settings. Resolves #619.

This commit is contained in:
Griatch 2015-03-06 21:21:07 +01:00
parent a6c2910e93
commit 04a1d9c238
3 changed files with 11 additions and 1 deletions

View file

@ -117,6 +117,11 @@ def _server_maintenance():
# validate channels off-sync with scripts
print "maintenance: validate channels..."
evennia.CHANNEL_HANDLER.update()
## Commenting this out, it is probably not needed
## with CONN_MAX_AGE set. Keeping it as a reminder
## if database-gone-away errors appears again /Griatch
#if _MAINTENANCE_COUNT % 18000 == 0:
# connection.close()
maintenance_task = LoopingCall(_server_maintenance)
maintenance_task.start(60, now=True) # call every minute