Core: idle connections now closed only once on exiting.

Iterating through all connections takes a lot of CPU time, especially
with large number of worker connections configured.  As a result
nginx processes used to consume CPU time during graceful shutdown.
To mitigate this we now only do a full scan for idle connections when
shutdown signal is received.

Transitions of connections to idle ones are now expected to be
avoided if the ngx_exiting flag is set.  The upstream keepalive module
was modified to follow this.
5 files changed
tree: e0dabf7a35438fe72eb650c259f90044289e7085
  1. auto/
  2. conf/
  3. contrib/
  4. docs/
  5. misc/
  6. src/
  7. .hgtags