Hi,
my problem belongs to PHP processes under Apache2:
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
I have a PHP script:
echo posix_getpid(), posix_getppid();
for($i=0;$i<10000000;$i++ ){
$var=0;
}
It prints the process id and the parent process id of the current script. After that, a little delay (the loop), to be able to launch a second request to the same script from the browser, before the first one has finished (on my PC ~5-6 seconds).
Both requests ( to the same script, running almost in the same time) displays:
7057 6983
6983 is the master parent apache process, 7057, ..., 7060 are the child processes . How is it possible, that a child serves two processes in the same time? (with MPM prefork).
I knew, that only MPM worker is able to run multiple threads under the same copy of the master process.
Thanks in advance.
p.s. the problem comes using APC with share memory segments between different processes/scripts