Django Celery Time Limit Exceeded?

拟墨画扇 提交于 2019-12-05 12:53:14

问题


I keep receiving this error...

[2012-06-14 11:54:50,072: ERROR/MainProcess] Hard time limit (300s) exceeded for movies.tasks.encode_media[14cad954-26e2-4511-94ec-b17b9a4149bb]

[2012-06-14 11:54:50,111: ERROR/MainProcess] Task movies.tasks.encode_media[bc173429-77ae-4c96-b987-75337f915ec5] raised exception: TimeLimitExceeded(300,)

Traceback (most recent call last): File "/srv/virtualenvs/filmlib/local/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 370, in _on_hard_timeout raise TimeLimitExceeded(hard_timeout)
TimeLimitExceeded: 300

even though I have CELERYD_TASK_TIME_LIMIT = 86400 and CELERYD_TASK_SOFT_TIME_LIMIT = 86400 in my settings.py for the project. Does anyone know why would it still be defaulting to 300s?

Thanks


回答1:


Modify your celeryd (/etc/init.d/celeryd) settings. Sample below sets the time limit to 2 hours.

CELERYD_OPTS="--time-limit=7200 -E --loglevel=DEBUG"


来源:https://stackoverflow.com/questions/11037105/django-celery-time-limit-exceeded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!