From: Luca Toscano AsyncRequestWorkerFactor
.
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 Scoreboad 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 terminate and free a
+ scoreboard slot (for example handling long running requests, slow clients
+ or a connection with keep-alive enabled). Two scenarios are very common:
MaxSpareThreads
).
+ This is particularly problematic because when the load increases again,
+ httpd will try to start more processes.
+ If the pattern repeats, the number of processes can rise quite a bit.
+ 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:
+ServerLimit
.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.
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.