Database error while syncing: OperationalError (2006, "MySQL server is gone") when worker is running 24 hours
my django work with celery, every 24 hours database (mysql) running. The first is normal and the second is an error, and the error information
OperationalError (2006, "MySQL server is gone")
my config:
import djcelery
djcelery.setup_loader()
CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'
BROKER_URL = 'amqp://guest:guest@localhost:5672//' # this was set in celery.py
CELERY_IMPORTS = ('OuranosApp.tasks', ) # this was set in celery.py
CELERY_RESULT_ENGINE_OPTIONS = {'echo': True}
I think I need to manually close the connection to mysql. But I don't know how to do it.
+3
source to share
No one has answered this question yet
Check out similar questions: