close support in Event. these are set by the listener due to a residual
c->sbh for a worker thread no longer associated with the connection.
the associated worker threads are really idle and blocked in
ap_queue_pop_something and will serve new work normally. but since they
are marked as SERVER_CLOSING rather than SERVER_READY in the scoreboard,
the parent process thinks they are busy and forks extra children.
reproduction recipe: start Event with server-status enabled. hit
localhost/server-status?refresh=5 and watch the C's trail behind the lone W.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1203708 13f79535-47bb-0310-9956-
ffa450edef68
return 1;
}
- ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
+ if (c->sbh) {
+ ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
+ }
#ifdef NO_LINGCLOSE
ap_flush_conn(c); /* just close it */
static int start_lingering_close(conn_state_t *cs, ap_equeue_t *eq)
{
apr_status_t rv;
+
+ cs->c->sbh = NULL; /* prevent scoreboard updates from the listener
+ * worker will loop around soon and set SERVER_READY
+ */
+
if (ap_start_lingering_close(cs->c)) {
apr_pool_clear(cs->p);
ap_push_pool(worker_queue_info, cs->p);