[nginx] svn commit: r4954 - in branches/stable-1.2: . src/core src/os/unix
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Dec 10 17:46:52 UTC 2012
Author: mdounin
Date: 2012-12-10 17:46:51 +0000 (Mon, 10 Dec 2012)
New Revision: 4954
URL: http://trac.nginx.org/nginx/changeset/4954/nginx
Log:
Merge of r4918: cache manager startup with many listen sockets.
Fixed failure to start cache manager and cache loader processes
if there were more than 512 listening sockets in configuration.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/core/ngx_connection.c
branches/stable-1.2/src/os/unix/ngx_process_cycle.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-12-10 16:35:32 UTC (rev 4953)
+++ branches/stable-1.2 2012-12-10 17:46:51 UTC (rev 4954)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4917
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4918
\ No newline at end of property
Modified: branches/stable-1.2/src/core/ngx_connection.c
===================================================================
--- branches/stable-1.2/src/core/ngx_connection.c 2012-12-10 16:35:32 UTC (rev 4953)
+++ branches/stable-1.2/src/core/ngx_connection.c 2012-12-10 17:46:51 UTC (rev 4954)
@@ -749,6 +749,8 @@
ls[i].fd = (ngx_socket_t) -1;
}
+
+ cycle->listening.nelts = 0;
}
Modified: branches/stable-1.2/src/os/unix/ngx_process_cycle.c
===================================================================
--- branches/stable-1.2/src/os/unix/ngx_process_cycle.c 2012-12-10 16:35:32 UTC (rev 4953)
+++ branches/stable-1.2/src/os/unix/ngx_process_cycle.c 2012-12-10 17:46:51 UTC (rev 4954)
@@ -1296,14 +1296,19 @@
void *ident[4];
ngx_event_t ev;
+ /*
+ * Set correct process type since closing listening Unix domain socket
+ * in a master process also removes the Unix domain socket file.
+ */
+ ngx_process = NGX_PROCESS_HELPER;
+
+ ngx_close_listening_sockets(cycle);
+
+ /* Set a moderate number of connections for a helper process. */
cycle->connection_n = 512;
- ngx_process = NGX_PROCESS_HELPER;
-
ngx_worker_process_init(cycle, -1);
- ngx_close_listening_sockets(cycle);
-
ngx_memzero(&ev, sizeof(ngx_event_t));
ev.handler = ctx->handler;
ev.data = ident;
More information about the nginx-devel
mailing list