]> git.kaiwu.me - nginx.git/commit
Improved connection draining with small number of connections.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 20 Jan 2017 11:03:20 +0000 (14:03 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 20 Jan 2017 11:03:20 +0000 (14:03 +0300)
commitc3ad24da01c062eaa4eb096f85f9be2312316821
tree20c15be390173fe2638da269b29bc9c7bc449d04
parent660e1a5340f15bdfcedfd298ccf96ca8a9604af2
Improved connection draining with small number of connections.

Closing up to 32 connections might be too aggressive if worker_connections
is set to a comparable number (and/or there are only a small number of
reusable connections).  If an occasional connection shorage happens in
such a configuration, it leads to closing all reusable connections instead
of gradually reducing keepalive timeout to a smaller value.  To improve
granularity in such configurations we now close no more than 1/8 of all
reusable connections at once.

Suggested by Joel Cunningham.
src/core/ngx_connection.c
src/core/ngx_cycle.h