Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I run a PHP script through browser ( HTTP connection) the PID is printed for debugging, but when this request is closed by clicking the browser's Stop button, or closing this browser tab, I still see the process when I run ps -aux in terminal.

www-data 2613 0.0 1.2 42320 12968 ? S 17:14 0:00 /usr/sbin/apache2 -k start

How long this process will keep lurking for no reason? And should one worry about many of those zombies in production? Given that, the PHP script does nothing but printing the PID, sleeps for 5 seconds, and then ends.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

It generally isn't something to worry about. Each process handles multiple http requests as standard.

If you are seeing more than 20 then there could be a problem. The default on most distros is between 10 and 20 spare apache servers.

share|improve this answer
    
by running ps -aux | grep apache2 | wc -l it always gives a number between 10 and 20. I know know what is Apache worker process also. Thanks! –  rahmanisback May 1 '11 at 16:15
1  
@rahmanisback: you can see how many instances will run (max, min, etc) in your apache2.conf. For example (in a debian/ubuntu server): sed -n '/mpm_prefork_module/,/IfModule/{p}' /etc/apache2 will show you the numbers –  hmontoliu May 1 '11 at 16:36
    
@hmontoliu Thanks –  rahmanisback May 1 '11 at 17:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.