How does Apache process several requests at a time?

Posted by Vicenç Gascó on Server Fault See other posts from Server Fault or by Vicenç Gascó
Published on 2012-09-28T09:28:11Z Indexed on 2012/09/28 9:39 UTC
Read the original article Hit count: 147

Filed under:
|
|

In a short question: If 10 requests hit Apache, does it process them one by one, so when R3 finishes, then it starts to run R4, or does it fire 10 processes/threads/whatever and are resolved simultaneously?

Now some background: I have a PHP script that takes up to two minutes to do some processes. My question is: while a client is waiting for this 2 minutes, all the other clients requests are being processed? Or also waiting for this one to end?

By the way, if there are simultaneous request, how can I handle them? Let's say put a limit on them. Or a limit on resources consumed. For instance I want the server to use its 80% performance on serving the webapp, and just a 20% for those long operations ... because I have no hurry to end them.

Doesn't know if it cares but is all in PHP.

Thanks in advance!!

© Server Fault or respective owner

Related posts about apache2

Related posts about php