Nginx and/or Passenger failing

springbok nginx-forum at nginx.us
Tue Sep 27 07:54:07 UTC 2011


Hi,

Envirionment: 
Passenger 3.0.9 
nginx 1.0.6 
Suse SLE 11 
Rails 3.0.7 
Ruby 1.9.2 p136 
Quad core 
8 GB 
Single Rails application 

nginx settings:

worker_processes 3;
worker_rlimit_nofile 8192;
worker_priority 0;
events {
  multi_accept off;
  worker_connections 4096;
}

pid /var/run/nginx.pid;
error_log  logs/error.log debug;
http {
    passenger_root
/usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.9;
    passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136/ruby;
    passenger_max_pool_size 4; 
    passenger_min_instances 1;
    keepalive_timeout 180;
    client_body_buffer_size 128k;
    client_header_buffer_size 2k;
    large_client_header_buffers 32 64k;
    passenger_pool_idle_time 300;
    passenger_log_level 2;
    passenger_use_global_queue on;
    include       /opt/nginx/conf/mime.types;
    default_type  application/octet-stream;
    log_format main      '$remote_addr - $remote_user [$time_local]  '
      '"$request" $status $bytes_sent '
      '"$http_referer" "$http_user_agent" '
      '"$gzip_ratio"';
    access_log  logs/access.log  main;
    sendfile        on;
    tcp_nopush        on;
    tcp_nodelay       off;
    gzip            on;
    gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_min_length  1000;
    gzip_types      text/plain text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
...

I'm not sure if the problem lies with passenger or nginx, after a period
of time the passenger as well as the nginx master process shuts down.
When I look in the log file I have the following:

2011/09/27 16:45:36 [info] 6408#0: *204 client 61.88.141.194 closed
keepalive connection
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:45:46.849 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:46:01.848 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:46:16.848 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:46:31.848 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:46:46.849 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:47:01.849 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:47:16.848 ]: Flushing all sinks (periodic action)
[ pid=6381 thr=140088026498848
file=ext/common/LoggingAgent/LoggingServer.h:829 time=2011-09-27
16:47:31.848 ]: Flushing all sinks (periodic action)
[ pid=6371 thr=139975134312192 file=ext/common/Watchdog.cpp:1057
time=2011-09-27 16:47:38.756 ]: Web server did not exit gracefully,
forcing shutdown of all service processes...
2011/09/27 16:49:00 [crit] 6410#0: *250 connect() to
unix:/passenger_helper_server failed (2: No such file or directory)
while connecting to upstream, client: 120.146.194.176, serv
er: localhost, request: "GET /candidates/new HTTP/1.1", upstream:
"passenger:unix:/passenger_helper_server:", host: "61.88.141.221",
referrer: "http://61.88.141.221/home/view_repor
ts"

When I look at the running processes the nginx master is no longer
running but the workers are still running, I have to kill them before I
can restart. All passenger processes are not longer running.

As I said I'm not sure which process is causing the other to close and I
have no idea what the problem may be, so any help greatly appreciated.

Etienne.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,215871,215871#msg-215871



More information about the nginx mailing list