diff src/core/ngx_cycle.h @ 6930:97c99bb43737

Introduced worker_shutdown_timeout. The directive configures a timeout to be used when gracefully shutting down worker processes. When the timer expires, nginx will try to close all the connections currently open to facilitate shutdown.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 07 Mar 2017 18:51:16 +0300
parents 426828549afc
children 84e53e4735a4
line wrap: on
line diff
--- a/src/core/ngx_cycle.h
+++ b/src/core/ngx_cycle.h
@@ -88,6 +88,7 @@ typedef struct {
     ngx_flag_t                master;
 
     ngx_msec_t                timer_resolution;
+    ngx_msec_t                shutdown_timeout;
 
     ngx_int_t                 worker_processes;
     ngx_int_t                 debug_points;
@@ -129,6 +130,7 @@ ngx_pid_t ngx_exec_new_binary(ngx_cycle_
 ngx_cpuset_t *ngx_get_cpu_affinity(ngx_uint_t n);
 ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name,
     size_t size, void *tag);
+void ngx_set_shutdown_timer(ngx_cycle_t *cycle);
 
 
 extern volatile ngx_cycle_t  *ngx_cycle;