Apache – Why is apache2 showing up a defunct in the process list

apache-httpdprocessps

When I run top I see one line that doesn't look too good:

 2475 www-data  20   0     0    0    0 Z    1  0.0   0:00.19 apache2 <defunct> 

Why is this process <defunct> and what should I do about it?

Best Answer

It is harmless. You can ignore it. It is a zombie process. The man page for ps has

Z    Defunct ("zombie") process, terminated but not reaped by its parent.

See also the Wikipedia page on Zombie process.

If you really want to get rid of it, restarting apache2 may do the trick. Rebooting the machine will certainly make it go away, but that is definitely not necessary.

This question is similar. - How can I kill a <defunct> process whose parent is init?

Related Question