Was getting 'application not registered on db instance and no application bound to current context'
when celery workers were restarted because of CELERYD_MAX_TASKS_PER_CHILD
or when killed by the kernel to free memory. CELERYD_MAX_TASKS_PER_CHILD
is needed to keep memory use under control
http://chase-seibert.github.io/blog/2013/08/03/diagnosing-memory-leaks-python.html
This sets a conservative default of CELERYD_MAX_TASKS_PER_CHILD
and makes sure a new app context is given to a new worker.
Was getting 'application not registered on db instance and no application bound to current context' when celery workers were restarted because of CELERYD_MAX_TASKS_PER_CHILD or when killed by the kernel to free memory. CELERYD_MAX_TASKS_PER_CHILD is needed to keep memory use under control http://chase-seibert.github.io/blog/2013/08/03/diagnosing-memory-leaks-python.html
This sets a conservative default of CELERYD_MAX_TASKS_PER_CHILD and makes sure a new app context is given to a new worker.