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.
Event is based on the worker, mPM, which implements a hybrid multi-process multi-threaded server.
MaxRequestWorkers was called MaxClients prior to version.3.13.
The idea is to use ServerLimit to instruct httpd about how many overall processes are tolerated before impacting the system resources.Async connections, async connections would need a fixed dedicated worker thread with the previous MPMs but not with event.The only alternative is to buffer the response in memory, but it wouldn't be the safest option for the sake of the server's stability and memory footprint.Sending the response and then closing the connection immediately is not the correct thing to do since the client (still trying to send the rest of the request) would get a connection reset and could not read the httpd's response.All modules shipped with the server are compatible with the event MPM.This MPM depends on APR 's atomic compare-and-swap operations for thread synchronization.Two scenarios are very common: During a graceful restart.
After a client completes the first request, it can keep the connection open, sending keno 4000 5 l further requests using the same socket and saving significant overhead in creating TCP connections.
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".
Meanwhile in the latter example (fcgi/CGI/proxied content) the MPM can't predict the end of the response and a worker thread has to finish its work before returning the control to the listener.A single control process (the parent) is responsible for launching child processes.MaxRequestWorkers threadsPerChild meanwhile the Scoreboard is a representation of all the running processes and the status of their worker threads.The event MPM handles some connections in an asynchronous way, where request worker threads are only allocated for short periods of time as needed, and other connections with one request worker thread reserved per connection.These improvements are valid for both http/https connections.Closing, sometimes the MPM needs to perform a lingering close, namely sending back an early error to the client while it is still transmitting data to httpd.This MPM does not perform well on older platforms which lack good threading, but the requirement for EPoll or KQueue makes this moot.If you are compiling for an x86 target and you don't need to support 386s, or you are compiling for a sparc and you don't need to run on pre-Ultrasparc chips, add to the configure script's arguments.The former is predictable, namely the event MPM has full visibility on the end of the content and it can use events: the worker thread serving the response content can flush the first bytes until ewouldblock or eagain is returned, delegating the rest to the.