higkoo / nginx-sflow-module

Automatically exported from code.google.com/p/nginx-sflow-module
Other
0 stars 0 forks source link

sflow module blocks nginx to do graceful shutdown #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. "nginx -s quit" will put worker into "shutting down" state which never 
finishes
2. "nginx -s stop" stops nginx successfully

What is the expected output? What do you see instead?

I would expect nginx workers shut down. Instead they hang in "shutting down" 
status

What version of the product are you using? On what operating system?

0.9.7, Centos 6

Please provide any additional information below.

Original issue reported on code.google.com by sergei.k...@gmail.com on 5 Jan 2014 at 2:45

GoogleCodeExporter commented 8 years ago
Thanks.  I will look at this as soon as possible and let you know when there is 
a fix.

Neil

Original comment by neil.mck...@gmail.com on 6 Jan 2014 at 12:50

GoogleCodeExporter commented 8 years ago
Please try version 0.9.8 (or 'svn update' if you are using subversion).  The 
graceful shutdown was not completing because the sflow module still had a 
timer-tick event pending.  The fix was to ensure that the timer-event is not 
re-armed if the process is shutting down.  Now it shuts down smoothly after the 
timer event has been processed,  so the delay is <= 1 second.

As far as I could tell the only indication the module has that there is a 
shutdown underway is the "ngx_exiting" global variable,  which is referenced 
via src/os/unix/ngx_process_cycle.h included from ngx_core.h.

Thank you for raising this.  Please confirm that it is fixed.

Neil

Original comment by neil.mck...@gmail.com on 7 Jan 2014 at 1:05

GoogleCodeExporter commented 8 years ago
All is good, works like a charm!

Thank you!

Sergei

Original comment by sergei.k...@gmail.com on 7 Jan 2014 at 9:00