Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have used nginx and gunicorn to host my website in two servers,

Both server have same versions of packages and website is successfully hosted,

But in one of my server gunicorn always gets timeout and I get error

[CRITICAL]Worker Timeout
Booting worker with pid
Worker cannot boot with pid

And after this I get 502 Badgateway error in webpage. I have to restart the gunicorn process to bring up website.

Following is the error log :

2014-02-16 14:29:53 [1267] [CRITICAL] WORKER TIMEOUT (pid:4994)
2014-02-16 14:29:53 [1267] [CRITICAL] WORKER TIMEOUT (pid:4994)   
2014-02-16 14:29:53 [22140] [INFO] Booting worker with pid: 22140

And I get continuos error like this,

2014-02-16 14:29:53 [22140] [DEBUG] Ignoring EPIPE
Ignoring EPIPE
2014-02-16 14:29:53 [22140] [DEBUG] Ignoring EPIPE
Ignoring EPIPE
2014-02-16 14:29:57 [22140] [DEBUG] Ignoring EPIPE
Ignoring EPIPE

And worker starts again,

2014-02-16 14:32:44 [1267] [CRITICAL] WORKER TIMEOUT (pid:4993)
2014-02-16 14:32:44 [1267] [CRITICAL] WORKER TIMEOUT (pid:4993)
2014-02-16 14:32:44 [22276] [INFO] Booting worker with pid: 22276

Again Ignoring EPIPE error and this continues until I restart the gunicorn. And when I am getting this error I get 504 gateway error from nginx

share|improve this question
1  
Can you provide more information, please? The command-line you're using to launch Gunicorn would be a good start. –  supervacuo Dec 18 '13 at 13:49
    
Trace the worker to see where it's getting stuck: strace -p <PID> -e trace=network -t –  Aryeh Leib Taurog Feb 5 at 18:36
    
What is the application you are running? You might want to increase the default timeout. –  Burhan Khalid Feb 17 at 6:58
    
Yes Burhan Khalid , for now I have increased proxy_read_timeout to 1200 in nginx and timeout to 3600 in gunicorn configuration. Hope this works –  s.m Feb 17 at 9:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.