Mercurial > hg > nginx
comparison src/core/ngx_cycle.h @ 6873:426828549afc
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 20 Jan 2017 14:03:20 +0300 |
parents | 1bf4f21b1b72 |
children | 97c99bb43737 |
comparison
equal
deleted
inserted
replaced
6872:6ed0922d316b | 6873:426828549afc |
---|---|
51 ngx_module_t **modules; | 51 ngx_module_t **modules; |
52 ngx_uint_t modules_n; | 52 ngx_uint_t modules_n; |
53 ngx_uint_t modules_used; /* unsigned modules_used:1; */ | 53 ngx_uint_t modules_used; /* unsigned modules_used:1; */ |
54 | 54 |
55 ngx_queue_t reusable_connections_queue; | 55 ngx_queue_t reusable_connections_queue; |
56 ngx_uint_t reusable_connections_n; | |
56 | 57 |
57 ngx_array_t listening; | 58 ngx_array_t listening; |
58 ngx_array_t paths; | 59 ngx_array_t paths; |
59 | 60 |
60 ngx_array_t config_dump; | 61 ngx_array_t config_dump; |