2013-09-01 180 views
0

我有兩臺配置爲在supervisor下運行的celerycam進程。這裏是我的supervisord.conf的一部分:多臺celerycam在同一臺服務器上運行

[program:dev1_celerycam]  
directory = /var/www/dev1.example.com 
command = /usr/bin/python2.7 /var/www/dev1.example.com/manage.py celerycam --logfile=/var/log/supervisor/dev1_celerycam.log --workdir=/var/www/dev1.example.com 
stderr_logfile = /var/log/supervisor/dev1_celerycam_error.log 
stdout_logfile = /var/log/supervisor/dev1_celerycam.log 
exitcodes=0,2 
priority=993 

[program:dev_celerycam]  
directory = /var/www/dev.example.com 
command = /usr/bin/python2.7 /var/www/dev.example.com/manage.py celerycam --logfile=/var/log/supervisor/dev_celerycam.log --workdir=/var/www/dev.example.com 
stderr_logfile = /var/log/supervisor/dev_celerycam_error.log 
stdout_logfile = /var/log/supervisor/dev_celerycam.log 
exitcodes=0,2 
priority=995 

另外我有superleryord.conf中芹菜的兩個進程。他們在同一臺服務器上啓動完美。但對於celerycam工藝之一,我得到下一個中​​supervisord.log:

2013-09-01 09:35:12,546 INFO exited: dev_celerycam (exit status 1; not expected) 
2013-09-01 09:35:12,546 INFO received SIGCLD indicating a child quit 
2013-09-01 09:35:15,555 INFO spawned: 'dev_celerycam' with pid 25504 
2013-09-01 09:35:16,540 INFO exited: dev_celerycam (exit status 1; not expected) 
2013-09-01 09:35:16,540 INFO received SIGCLD indicating a child quit 
2013-09-01 09:35:17,542 INFO gave up: dev_celerycam entered FATAL state, too many start retries too quickly 

出現這種情況對supervisord重啓dev_celerycam或dev1_celerycam。其中一個起步良好,另一個失敗。看起來它是隨機發生的。

是否有任何機會讓celerycam進程工作?

回答

0

celerycam進程都以某種方式在相同的路徑創建pid文件。必須爲每個celerycam進程添加--pidfile參數。

相關問題