Kill defunct PHP processes

If you have run into defunct php processes that keep running on the server which causes the CPU load to increase, read on…

Normally to kill these process we can use

ps aux | grep -i “defunc” | awk {‘print “kill -9 “$2?} | sh

but this is not a permanent solution.

The root cause of this issue is usually due to an apache bug related to the suphp module.

According to
When I am using suPHP I have zombie processes. What’s the problem?

Apache 1.3.28 has a bug in the Apache core which causes CGI processes not to be ended correctly. mod_suphp uses some of this core functions, however it is not a bug in mod_suphp but in Apache itself. The bug is first occured in Apache 1.3.28 and is fixed since Apache 1.3.29


I am a g33k, Linux blogger, developer, student and Tech Writer for My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....