Nginx restart trouble

Hello,

i got some problems with nginx when a “/etc/init.d/nginx restart” is
beeing done. Sometimes Nginx (doesnt matter which version… 0.6.x &
0.7.x seem to be affected) dies. Sometimes i see processes which are
called “nginx shutting down” which keep running for minutes.

at the moment i fixed it with a sleep 1s in the nginx init script, but
that couldnt be a final solution.

OS is CentOS5

Thanks

Juergen

On Mon, 2009-08-31 at 14:42 +0200, Juergen G. wrote:

i got some problems with nginx when a “/etc/init.d/nginx restart” is
beeing done. Sometimes Nginx (doesnt matter which version… 0.6.x &
0.7.x seem to be affected) dies. Sometimes i see processes which are
called “nginx shutting down” which keep running for minutes.

at the moment i fixed it with a sleep 1s in the nginx init script, but
that couldnt be a final solution.

Correct me if i’m wrong, but you shouldn’t need a ‘restart’ in
production. Even when upgrading. Why do you use ‘restart’?

:)))

i like when somebody asking something and instead of answering his/her
question you ask back why do you want to do that

i guess you have to check you init script and see what is happening
exactly,
i have seen on some OSes had problem with broken init script instead of
the
actual service eg. nginx in this case

i haven’t seen the whole thread but would you mind to paste that script
to
pastie.org to check?

2009/8/31 MirosÅ‚aw Jaworski [email protected]

On Monday, August 31, 2009 at 15:42:36, Juergen G. wrote:

JG> i got some problems with nginx when a “/etc/init.d/nginx restart” is
JG> beeing done. Sometimes Nginx (doesnt matter which version… 0.6.x &
JG> 0.7.x seem to be affected) dies. Sometimes i see processes which are
JG> called “nginx shutting down” which keep running for minutes.

yes. this is bug in CentOS/EPEL nginx initscript.

JG> at the moment i fixed it with a sleep 1s in the nginx init script,
JG> but that couldnt be a final solution.

JG> OS is CentOS5

you never need “service nginx restart”.
better solution is use “service nginx reload”,
or “service nginx force-reload” (online upgrade).

fixed CentOS nginx initscript in attach.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs