2012-06-14 78 views
12

我不斷收到這個錯誤...Django芹菜超時了嗎?

[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 

即使我有CELERYD_TASK_TIME_LIMIT = 86400CELERYD_TASK_SOFT_TIME_LIMIT = 86400在我的settings.py的項目。有誰知道爲什麼它仍然會違約到300?

謝謝

回答

15

修改您的芹菜(/etc/init.d/celeryd)設置。下面的示例將時間限制設置爲2小時。

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

這樣做了,謝謝! – JeffC