# HG changeset patch
# User Gu Feng <flygoast(a)126.com>
# Date 1414410723 -28800
# Mon Oct 27 19:52:03 2014 +0800
# Node ID ccc3b86835da54273c333e7d6a00f68e0b0e6c27
# Parent 973fded4f461f3a397779b3a1dc80881b1b34974
Upstream: limited next_upstream time and tries when resolving DNS.
When got multiple upstream IP addresses using DNS resolving, the number of
upstreams tries and the maxinum time spent for these tries were not affected.
This patch fixed it.
diff -r 973fded4f461 -r ccc3b86835da src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Wed Oct 15 22:57:23 2014 +0400
+++ b/src/http/ngx_http_upstream.c Mon Oct 27 19:52:03 2014 +0800
@@ -974,6 +974,14 @@ ngx_http_upstream_resolve_handler(ngx_re
ur->ctx = NULL;
+ u->peer.start_time = ngx_current_msec;
+ if (u->conf->next_upstream_tries
+ && u->peer.tries > u->conf->next_upstream_tries)
+ u->peer.tries = u->conf->next_upstream_tries;
is it true, that SIGHUP is not handled by ngx_module_t /* exit process */ ?
I mean if I have these defined:
ngx_http_modsecurity_terminate, /* exit process */
ngx_http_modsecurity_terminate, /* exit master */
So, sending SIGHUP to the master it doesn't call the
ngx_http_modsecurity_terminate(). If sending SIGTERM it does. How is it for
If I send SIGHUP to the parent I get only:
Program received signal SIGHUP, Hangup.
If I send SIGTERM to the parent I get what I'm expected to get to SIGHUP as
#0 modsecTerminate () at api.c:237