Welcome! Log In Create A New Profile

Advanced

nginx dies after a few minutes (unicorn)

Stanley Sh
August 04, 2010 11:06PM
I am running unicorn behind nginx to host Rails 3

Both nginx and unicorn run flawlessly when first started but nginx dies
inexplicably about 5-10 minutes later. Unicorn, however, stays up and is
still accessible through its own port.

Here is my nginx configuration pertaining to this application:


upstream unicorn {
server unix:/tmp/.sock fail_timeout=0;
}

server {
server_name example.com;
root /www/example.com/current/public;

keepalive_timeout 5;

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://unicorn;
break;
}
}
}

I have nginx's error_log enabled with the debug flag but there are few
clues in the error log file:

2010/08/04 19:34:59 [info] 20254#0: *4 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:34:59 [info] 20254#0: *5 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:35:17 [info] 20254#0: *8 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:35:17 [info] 20254#0: *9 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:35:18 [info] 20254#0: *10 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:35:18 [info] 20254#0: *11 client 98.173.61.21 closed
keepalive connection
2010/08/04 19:35:18 [info] 20254#0: *12 client 98.173.61.21 closed
keepalive connection
--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx dies after a few minutes (unicorn)

Stanley Sh August 04, 2010 11:06PM

Re: nginx dies after a few minutes (unicorn)

Igor Sysoev August 05, 2010 06:20AM

Re: nginx dies after a few minutes (unicorn)

Stanley Sh August 05, 2010 05:56PM

Re: nginx dies after a few minutes (unicorn)

Igor Sysoev August 06, 2010 02:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 169
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready