Title says it all. The php5 child processes spawned by www-data don't get killed for a long time. They are not "orphan" (i.e they aren't owned by init) so killing them manually might cause some data loss.
I have PHP_FCGI_MAX_CHILDREN = 5 in my config. I've executed
Code:
ab -n 1000 -c 5 [domain]
in another machine while watching "top" on my linode.
Code:
9828 www-data 20 0 105m 26m 14m S 0 7.7 0:20.02 php5
9830 www-data 20 0 105m 26m 14m S 0 7.7 0:23.29 php5
9829 www-data 20 0 105m 26m 14m S 0 7.6 0:39.03 php5
9638 www-data 20 0 104m 26m 14m S 0 7.6 0:31.26 php5
9690 www-data 20 0 103m 25m 14m S 0 7.2 0:31.88 php5
As you can see, all of the children remain at ~7.7% RAM which, to me, is simply a waste of resources.
Is there a way to terminate the children immediately after their work is done?