0

This is the log:

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 17 idle, and 37 total children

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 18 idle, and 37 total children

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 18 idle, and 37 total children

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 19 idle, and 37 total children

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 18 idle, and 38 total children

[info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 15 idle, and 39 total children

The message isn't very clear to me and apache2 documentation doesn't help either.

What are those children, why is it spawning 8, what are idle children and what are total children? What is it trying to tell me?

2

The children are threads or more abstractly 'workers' that are used to accept() and process connections.

It is spawning 8 because Apache HTTPd has detected an average load that would be better served by more workers. It is 'faster' to 'pre-spawn' these workers. IE: If there are 8 requests being handled and a 9th comes in, Apache must spawn a 9th worker to accept and process the connection. This is a relatively expensive process (the spawning). Apache is just dynamically adjusting its worker pool to the load.

Idle children are children that are waiting to begin working on a connection. total children reflects the size of the entire pool. Here you have approximately 20 'working' workers (non-idle).

  • 1
    Good answer. IIRC "accept()" is called in a central process/thread. Upon a connection, the resulting socket is then handed to a worker thread/process. (Linux kernel 3.11 has changed that though, multiple accepts will be possible.) – AndreasM Sep 27 '13 at 12:55
  • admittedly I am not intimately familiar with the inner code / process. Good call though. – Daniel Widrick Sep 27 '13 at 12:59
  • So how come there are 18 idle when he spawned only 8? – Richard Rodriguez Sep 27 '13 at 13:09
  • Also, how StartServers and/or Min/MaxSpareServers reflect these values? Are servers = workers? – Richard Rodriguez Sep 27 '13 at 13:09
  • mail-archives.apache.org/mod_mbox/httpd-users/200507.mbox/… When load increases and IdleServers falls below MinSpareServers, new processes will be forked. When load falls, eventually the processes in excess of MaxSpareServers will be terminated. – Daniel Widrick Sep 27 '13 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.