On Mon, 28 May 2012, Xin Tong wrote:
Hello I am new to apache httpd. I noticed that apache httpd spawns many processes to server user request. one of the httpd process is the master (i.e. running with root id on linux). the other ones are it children ( i.e. running with daemon id). is the master httpd process kind of like a load dispatcher and the ones running with daemon like the workers ? Is there a way to build apache such that it does not spawn new processes. instead it spawns new threads within the root process to handle incoming request ?
If you want to rewrite it, go ahead. It has an open license. It spawns processes so that it can quickly service a new request coming in by dispensing it to the waiting process. You can control the min and max numbersof such waiting processes with the MinSpareServers and MaxSpareServers directives in the mpm_prefork_module
module description.(the former is what it starts out with, the latter what it settles down to with a reasonably active host). (I learned about this recently when I found my system with 160 waiting processes and the system swapping itself to death. No idea what went wrong, but after upgrading it has stayed pretty consistent at 20 (which is wha tthe MaxSpareServers is set to) It also does use threads. I think to handle multiple requests -- eg all the pictures on a web page-- on one main request. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx