Operating System - HP-UX
1830931 Members
2216 Online
110017 Solutions
New Discussion

Re: Apache stops serving requests

 
Arturo Quesada
Advisor

Apache stops serving requests

After 2 or 3 weeks, apache stops. serving. All process httpd are still running but Apache don't respond.
When I try stop Apache, remains about 5 process which have PPID=1 and connot be killed. Actually doing "kill -9 PID" does nothing. I can't start Apache again because port 80 is being used by these process. error.log and acces.log files don't shows anything (or I don't see it).
The only solution is reboot system.
I've got
Apache: 1.3.31
php: 4.3.4

Thanks in advance
14 REPLIES 14
Fred Ruffet
Honored Contributor

Re: Apache stops serving requests

Such case of processes not responding to "kill -9" corresponds to processes blocked on IOs. Next time, try to use lsof to see what files this processes are on, and if there are no problem on this file (disk corruption, files larger than 2GB on nolargefiles FS...)

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Arturo Quesada
Advisor

Re: Apache stops serving requests

Well lsof can help me to these process, but I'd like that Apache doesn't stopped sudenly
Fred Ruffet
Honored Contributor

Re: Apache stops serving requests

lsof will help you determining what is the reason for those processes to stop...

Have you looked at /var/adm/syslog/syslog.log ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Arturo Quesada
Advisor

Re: Apache stops serving requests

syslog.log doesn't say anything about this. I think the problem is in Apache, not in OS.
Actually, the process are running, I do
# ps -fu www
UID PID PPID C STIME TTY TIME COMMAND
www 2073 1 0 Dec 23 ? 1:19 /opt/apache/bin/httpd
www 10655 1 0 Dec 23 ? 1:28 /opt/apache/bin/httpd
www 4830 1 0 Dec 23 ? 1:27 /opt/apache/bin/httpd
#
Fred Ruffet
Honored Contributor

Re: Apache stops serving requests

If problem where in apache, kill -9 would work.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Arturo Quesada
Advisor

Re: Apache stops serving requests

That is a good answer. Now, I only can wait for the next stop and try to discover where are the errors.
rick jones
Honored Contributor

Re: Apache stops serving requests

Next time, before you start killing processes, you might use tusc to see which system calls they are in.

Also, so long as none of the hangers-on have a reference to the listen socket, if the Apache code has a proper SO_REUSEADDR setsockopt() in it, it should be able to restart - however if those hung processes have a reference to the listen socket, you are stuck.

I tend to track Zeus Web Server more closely than Apache since it is so much faster and so much of what I do is performance related - is 1.3.31 particularly old at this point? I was under the impression that the Apache world had move to version 2.

You might compare the number of Apache processes against the limits in the conf file and against maxuproc kernel settings.
there is no rest for the wicked yet the virtuous have no pillows
Arturo Quesada
Advisor

Re: Apache stops serving requests

Well, stops is here again.
I need help to see errors in lsof and tusc commands.
Rick, we use Apache 1.31 because it works well.
I send a file whit the output of
# lsof -u www
rick jones
Honored Contributor

Re: Apache stops serving requests

Works well except when it hangs right?-)

Your attachment was just lsof output, there was no tusc output I could see.
there is no rest for the wicked yet the virtuous have no pillows
Arturo Quesada
Advisor

Re: Apache stops serving requests

You´re right.

The output for tusc is lost (or I can´t find it). I'd like you to tell me which option I should use with tusc next time Apache
rick jones
Honored Contributor

Re: Apache stops serving requests

might add the -v option to have tusc decode the system call parameters instead of giving their raw values.
there is no rest for the wicked yet the virtuous have no pillows
Arturo Quesada
Advisor

Re: Apache stops serving requests

Hello Rick adn Fred again:

I send the tusc output and lsof output for the PID 8337. This process can't be killed doing "kill -9".

Could you help me, please?

Thank you
rick jones
Honored Contributor

Re: Apache stops serving requests

I'm asking the tusc expert about the tusc message as I cannot recall exactly what it means for a process to be "deactivated." My initial thought was it may have received a SIGSTOP, but that is just a WAG.
there is no rest for the wicked yet the virtuous have no pillows
rick jones
Honored Contributor

Re: Apache stops serving requests

My tusc expert has told me that the process deactiveated means it has been totally swapped-out. Might be time for you do do a search of the current patches for your OS release looking for any related to process deactivation. (Assuming there is no good reason for the process to be completely swapped-out).
there is no rest for the wicked yet the virtuous have no pillows