tags:

views:

106

answers:

1

When I read this thread, I am confused by Vinko Vrsalovic's reply

At server start you'll get minspare processes, which will keep growing until maxspare (or maxchildren) if more requests are coming.

Then, what will happen if the the value of maxspare and maxchildren are different? The server's processes will keep growing until maxspare or maxchildren or anything else?

Here is the given definition of the two terminology in the same reply:

maxspare : Maximum number of spare processes to keep running
maxchildren: Hard limit number of processes in prefork mode

+1  A: 

If you have a maxspare of 3 and maxchildren of 10:

When you start your server and have no requests, you should have 3 processes running.

If you have 3 requests on 3 separate processes, you should now have between 3 and 6 processes running. I believe there's some level of heuristic to starting new forks because FastCGI reuses already existing processes (unlike CGI which would just start one process per request and kill it after replying to the request).

On the other hand, if you get 1000 requests simultaneously, you can only have 10 forks running simultaneously. In other words, you are probably dropping some requests, but you are keeping your server from being DOSed.

Joe Tennies
When I start my server and have no requests, could I have between 0 and 3 processes running and affect the number of processes by setting the minspare value?
photon