django-celery==3.1.10
celery==3.1.20
python 2.7.13
我們已經寫了CustomDataBaseScheduler安排的任務,時間表完全任務上的時間。我們使用CeleryBeat Process作爲init腳本,但是celeryBeat消耗系統的全部內存,即一天24GB。
我試圖在celerybeat進程上運行pmap,但它顯示[anon]佔用的內存最多。
有人可以幫助調試和解決這個問題。
django-celery==3.1.10
celery==3.1.20
python 2.7.13
我們已經寫了CustomDataBaseScheduler安排的任務,時間表完全任務上的時間。我們使用CeleryBeat Process作爲init腳本,但是celeryBeat消耗系統的全部內存,即一天24GB。
我試圖在celerybeat進程上運行pmap,但它顯示[anon]佔用的內存最多。
有人可以幫助調試和解決這個問題。
首先,如果你在django 1.8或以上,請使用芹菜4.0及以上。在這種情況下,你不會需要django芹菜。在這種情況下,請遵循本教程。 http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
來到你的問題,它可能是以下原因之一:
django是1.7,所以不能使用芹菜4. debug.py在settings.py中是true,但是我們使用init腳本來啓動芹菜,我們使用INFO而不是debug。 –
我的意思是在django settings.py中調試。當你在settings.py中用django'DEBUG = True'運行芹菜時,你會得到[this](https://github.com/celery/celery/blob/d90caee6d91a0fcc91756329503a35bf8fef720a/celery/fixups/django.py#L202)。關掉調試並檢查是否可行。 – rmad17
嘗試升級django-celery == 3.2.1,但它需要升級django> = 1.8,我們有django == 1.7 因此升級了django-celery == 3.1.17這是3.1中的最新版本。也會嘗試debug = False。 –
你看過超時任何選項,比如'CELERYD_TASK_TIME_LIMIT'嗎? https://stackoverflow.com/questions/17541452/celery-does-not-release-memory –
你有沒有機會debug = True在settings.py上運行?據瞭解,這會導致芹菜內存泄漏:https://groups.google.com/forum/#!topic/celery-users/smV5tw59Ia4 – Tico
遷移到http://serverfault.com/? – Spacedman