Follow

nginx friends!

How can I configure the timeout that the parent process gives it's workers to drain all open connections before the workers are shut down?

The default seems to be 20 seconds.

· · Web · 2 · 0 · 0

@yngmar yep, but it doesn't come with a default value and even setting it to absurdly high values like 180s still kills my workers after 20 seconds flat.

@bascht Nothing else in ngx_process_cycle.c:ngx_worker_process_cycle that closes connections on SIGQUIT. Unless they're idle, so I'd look at that next?

Or are you shutting it down via some init script that gets tired of waiting and then fires off a SIGTERM after 20s by chance?

Don't know the whole scenario here :)

@yngmar No init script, just plain NGINX running in the foreground, receiving the signal. Retried the same with Caddy and it's grace_period and it works as expected. 🤷

Sign in to participate in the conversation
The olde Yakshed

This is a special little place in the Fediverse for a small group of purveyors of finest yak wool.