From: Luca Toscano Date: Thu, 15 Dec 2016 17:41:18 +0000 (+0000) Subject: Merge r1772357, r1772399, r1772512 from trunk: X-Git-Tag: 2.4.24~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50a71f3565a9aaa404d8ee4016b98fcc3c2f766e;p=apache Merge r1772357, r1772399, r1772512 from trunk: Add a section to mpm-event's documentation to advertise new changes I tried to add a summary of Stefan's last patches just backported to 2.4.x today. I've read all of them and tried to report Stefan's comment from PR 53555 as much as possible. Please review and let me know if I wrong something incorrect or not precise enough. Fixed some wording in mpm-event's doc page Added some notes in mpm-event's doc page Submitted by: elukey git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1774500 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index 5a9162333a..9e9b7cd28c 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -101,10 +101,77 @@ of the AsyncRequestWorkerFactor.

+
Graceful process termination and Scoreboard usage +

This mpm showed some scalability bottlenecks in the past leading to the following + error: "scoreboard is full, not at MaxRequestWorkers". + MaxRequestWorkers + limits the number of simultaneous requests that will be served at any given time + and also the number of allowed processes + (MaxRequestWorkers + / ThreadsPerChild), meanwhile + the Scoreboard is a representation of all the running processes and + the status of their worker threads. If the scoreboard is full (so all the + threads have a state that is not idle) but the number of active requests + served is not MaxRequestWorkers, + it means that some of them are blocking new requests that could be served + but that are queued instead (up to the limit imposed by + ListenBacklog). Most of the times + the threads are stuck in the Graceful state, namely they are waiting to + finish their work with a TCP connection to safely terminate and free up a + scoreboard slot (for example handling long running requests, slow clients + or connections with keep-alive enabled). Two scenarios are very common:

+ +

From 2.4.24 onward, mpm-event is smarter and it is able to handle + graceful terminations in a much better way. Some of the improvements are:

+ +

The behavior described in the last point is completely observable via + mod_status in the connection summary table through two new + columns: "Slot" and "Stopping". The former indicates the PID and + the latter if the process is stopping or not; the extra state "Yes (old gen)" + indicates a process still running after a graceful restart.

+
+
Limitations

The improved connection handling may not work for certain connection filters that have declared themselves as incompatible with event. In these - cases, this MPM will fall back to the behaviour of the + cases, this MPM will fall back to the behavior of the worker MPM and reserve one worker thread per connection. All modules shipped with the server are compatible with the event MPM.