Apache on linux : spawning processes or threads ?

Posted by Jerome WAGNER on Stack Overflow See other posts from Stack Overflow or by Jerome WAGNER
Published on 2010-04-09T10:10:17Z Indexed on 2010/04/09 10:13 UTC
Read the original article Hit count: 542

Filed under:
|
|

Hello, I would like to understand better exactly what is going on when Apache on linux receive an HTTP request in a process pre-fork model.

Let's say we have 20 Apache child processes waiting.

When I receive an HTTP request, is it true to say that 1 child process will be chosen to handle the request and that this process won't handle another request from another user until the first one is finished ?

I am asking the question because of a PHP limitation that states :

The locale information is maintained per process, not per thread.
If you are running PHP on a multithreaded server API like IIS or Apache
on Windows, you may experience sudden changes in locale settings while a script
is running, though the script itself never called setlocale(). This happens due
to other scripts running in different threads of the same process at the same
time, changing the process-wide locale using setlocale().

Thanks Jerome Wagner

© Stack Overflow or respective owner

Related posts about apache2

Related posts about php5