You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Duncan Drury <d....@gmail.com> on 2005/10/04 20:15:19 UTC

[users@httpd] Apache running with PID of 0

I am having some trouble with my installation of Apache and PHP, which had previously been running fine on FreeBSD.

I think there may be an error with my installation of PHP, but I am still trying to track that down.  However, one of the symptoms is Apache ends up running with a PID of 0 (or shows up as doing so when I ps -aux | grep httpd)  I don't know how to shut down this process with a PID of 0, so I am having to reboot the server every time this happens.  Tried googling the problem, but not found anything useful so far.

I wonder if anyone else on the list has experienced problems like this, and knows a quick way to kill Apache when it is running as pid 0.

Cheers,

Duncan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache running with PID of 0

Posted by Duncan Drury <d....@gmail.com>.
> It sounds like php to me too, with what you've said so far.
> What OS and PHP versions are you using?

FreeBSD 5.2, Apache 1.3.33 and PHP5.0.5.

> Can you paste the output of "ps -aux |head -1" and "ps -aux 
> |grep httpd" which shows this into an email back to the list?

I'll have to wait till a quiet time to get Apache into the PID 0 state -
it's a live server with customer sites on (damn!)  Will post next week.
Thanks for pointing me to FreeBSD support Scott - wasn't sure if pid 0 might
be an error or not.

Cheers so far.

Dunx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache running with PID of 0

Posted by Boysenberry Payne <bo...@humaniteque.com>.
It sounds like php to me too, with what you've said so far.
What OS and PHP versions are you using?


Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Oct 4, 2005, at 1:43 PM, Duncan Drury wrote:

> It tells me that apache isn't running and fails to start apache.
>
> I failed to mention that this is Apache 1.3.
>
> The problem I am having is almost certainly to do with PHP.
>
> If I do apachectl graceful, Apache won't start up until I comment out 
> the
> Load and AddModule directives for php5 in httpd.conf.
>
> Then if I uncomment out these directives the server starts fine.
>
> Then running apachectl graceful again throws apache into the PID 0
> situation, which I only know how to get out of by rebooting the whole
> server.
>
> Duncan
>
>> -----Original Message-----
>> From: Boysenberry Payne [mailto:boysenberry@humaniteque.com]
>> Sent: Tuesday, 4 October 2005 7:31 pm
>> To: users@httpd.apache.org
>> Subject: Re: [users@httpd] Apache running with PID of 0
>>
>> What happens when you do an apachectl restart or stop?
>>
>> Boysenberry
>>
>> boysenberrys.com | habitatlife.com | selfgnosis.com
>>
>> On Oct 4, 2005, at 1:15 PM, Duncan Drury wrote:
>>
>>> I am having some trouble with my installation of Apache and
>> PHP, which
>>> had previously been running fine on FreeBSD.
>>>
>>> I think there may be an error with my installation of PHP, but I am
>>> still trying to track that down.  However, one of the symptoms is
>>> Apache ends up running with a PID of 0 (or shows up as
>> doing so when I
>>> ps -aux | grep httpd)  I don't know how to shut down this
>> process with
>>> a PID of 0, so I am having to reboot the server every time this
>>> happens.  Tried googling the problem, but not found
>> anything useful so
>>> far.
>>>
>>> I wonder if anyone else on the list has experienced problems like
>>> this, and knows a quick way to kill Apache when it is
>> running as pid
>>> 0.
>>>
>>> Cheers,
>>>
>>> Duncan
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server
>>> Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache running with PID of 0

Posted by Duncan Drury <d....@gmail.com>.
It tells me that apache isn't running and fails to start apache.

I failed to mention that this is Apache 1.3.

The problem I am having is almost certainly to do with PHP.

If I do apachectl graceful, Apache won't start up until I comment out the
Load and AddModule directives for php5 in httpd.conf.

Then if I uncomment out these directives the server starts fine.

Then running apachectl graceful again throws apache into the PID 0
situation, which I only know how to get out of by rebooting the whole
server.

Duncan 

> -----Original Message-----
> From: Boysenberry Payne [mailto:boysenberry@humaniteque.com] 
> Sent: Tuesday, 4 October 2005 7:31 pm
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Apache running with PID of 0
> 
> What happens when you do an apachectl restart or stop?
> 
> Boysenberry
> 
> boysenberrys.com | habitatlife.com | selfgnosis.com
> 
> On Oct 4, 2005, at 1:15 PM, Duncan Drury wrote:
> 
> > I am having some trouble with my installation of Apache and 
> PHP, which 
> > had previously been running fine on FreeBSD.
> >
> > I think there may be an error with my installation of PHP, but I am 
> > still trying to track that down.  However, one of the symptoms is 
> > Apache ends up running with a PID of 0 (or shows up as 
> doing so when I 
> > ps -aux | grep httpd)  I don't know how to shut down this 
> process with 
> > a PID of 0, so I am having to reboot the server every time this 
> > happens.  Tried googling the problem, but not found 
> anything useful so 
> > far.
> >
> > I wonder if anyone else on the list has experienced problems like 
> > this, and knows a quick way to kill Apache when it is 
> running as pid 
> > 0.
> >
> > Cheers,
> >
> > Duncan
> >
> >
> > 
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server 
> > Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache running with PID of 0

Posted by Boysenberry Payne <bo...@humaniteque.com>.
What happens when you do an apachectl restart or stop?

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Oct 4, 2005, at 1:15 PM, Duncan Drury wrote:

> I am having some trouble with my installation of Apache and PHP, which 
> had previously been running fine on FreeBSD.
>
> I think there may be an error with my installation of PHP, but I am 
> still trying to track that down.  However, one of the symptoms is 
> Apache ends up running with a PID of 0 (or shows up as doing so when I 
> ps -aux | grep httpd)  I don't know how to shut down this process with 
> a PID of 0, so I am having to reboot the server every time this 
> happens.  Tried googling the problem, but not found anything useful so 
> far.
>
> I wonder if anyone else on the list has experienced problems like 
> this, and knows a quick way to kill Apache when it is running as pid 
> 0.
>
> Cheers,
>
> Duncan
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Re: Apache running with PID of 0

Posted by Duncan Drury <d....@gmail.com>.
> Is PHP5 installed as package? Binary or Source?
> 
I installed from the port.

Duncan


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache running with PID of 0

Posted by Boysenberry Payne <bo...@humaniteque.com>.
Is PHP5 installed as package? Binary or Source?


Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Oct 5, 2005, at 2:32 PM, Shankar Unni wrote:

> Duncan Drury wrote:
>
>> Output from ps -aux |grep httpd
>> root       645 99.0  0.8  8208 3920  ??  Rs    7:47PM   2:29.57
>> /usr/local/sbin/httpd
>> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  
>> (httpd)
>> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  
>> (httpd)
>> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  
>> (httpd)
> ...
>
> This ("ZW") means they're all zombies (I guess freebsd shows them as 
> "PID 0"). Your parent httpd process seems to be spinning wildly, and 
> not receiving the SIGCHLDs from the children? Or something else has 
> caused the signals to get blocked?
>
> I'd suspect PHP, too..
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache running with PID of 0

Posted by Shankar Unni <sh...@netscape.net>.
Duncan Drury wrote:

> Output from ps -aux |grep httpd
> root       645 99.0  0.8  8208 3920  ??  Rs    7:47PM   2:29.57
> /usr/local/sbin/httpd
> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
> www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
...

This ("ZW") means they're all zombies (I guess freebsd shows them as 
"PID 0"). Your parent httpd process seems to be spinning wildly, and not 
receiving the SIGCHLDs from the children? Or something else has caused 
the signals to get blocked?

I'd suspect PHP, too..


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache running with PID of 0

Posted by Duncan Drury <d....@gmail.com>.
Scott Gifford said:
> Can you paste the output of "ps -aux |head -1" and "ps -aux 
> |grep httpd" which shows this into an email back to the list?

After doing apachectl graceful (with Apache running ok)

Output from ps -aux |head -1
USER       PID %CPU %MEM   VSZ  RSS  TT  STAT STARTED      TIME COMMAND

Output from ps -aux |grep httpd
root       645 99.0  0.8  8208 3920  ??  Rs    7:47PM   2:29.57
/usr/local/sbin/httpd
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)
www          0  0.0  0.0     0    0  ??  ZW   -         0:00.00  (httpd)

Apache now unresponsive.  Apachectl stop doesn't give any changes to the
output above.

I have to reboot FreeBSD, then comment out the PHP Load and AddModule
directives, apachectl start, then uncomment those directives and apachectl
restart to get it all working again.  Most odd.

Have queried the FreeBSD users list to find out about pid 0.

Dunx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache running with PID of 0

Posted by Scott Gifford <sg...@suspectclass.com>.
"Duncan Drury" <d....@gmail.com> writes:

[...]

> one of the symptoms is Apache ends up running with a PID of 0 (or
> shows up as doing so when I ps -aux | grep httpd)

Can you paste the output of "ps -aux |head -1" and "ps -aux |grep
httpd" which shows this into an email back to the list?

Unless FreeBSD uses PID 0 for something unusual, having that PID would
have to be a kernel bug.  Unfortunately I don't know FreeBSD that
well; maybe somebody on one of the FreeBSD mailint lists could explain
it.

----Scott.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org