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.

I'm experiencing a problem with a php/apache install on debian lenny. At random times during the day it will stop servicing request for .php pages, but static pages (html/css etc.) continue to work. There is no useful information in the apache or php error logs. There are ~40 sites running on this server, so I can't even tell which site is causing the problem.

Does anyone have nay ideas on how to troubleshoot this problem?

Thanks

share|improve this question

3 Answers 3

Very odd behaviour and not a lot of information to go on. What do you mean by 'it will stop servicing request for .php'? You get no response? An error? the unparsed PHP file? Something else?

Based on the information you've provided, the only way to progres this would be to setup some automatic polling of a simple PHP page - e.g. using nagios

share|improve this answer
    
It will timeout. I've already setup monitoring, so I'll know when it happens, but I'm not sure how to proceed from there. How can i identify which of the apache instances is misbehaving? Can I somehow get a list of resources used by that instance? etc. –  jw. Jun 22 '11 at 11:48
    
Update: I've dumped the status of apache while it was hung: pastebin.com/QZiXxkyX As you can see it apparently keeps spawning new apache processes that all keep hanging until it can't spawn any more new processes. I guess there's some php code that's called that somehow hangs the interpreter without crashing it, and everytime it's called it spawns a new apache process that immediately hangs. –  jw. Jun 22 '11 at 13:36

Are you swapping out/using up your memory? How is disk space looking?

If you are using database, can you make a successful connection to it when this happens?

Are you running as FCGI? If so, does garbage collection remove socket created within /tmp/ space?

share|improve this answer

To try narrow the problem down to a specific vhost, I would suggest adding the 'ExtendedStatus on' directive for mod_status1. This will report the virtual host names in the mod_status report which you pastebin'ed. Once you've narrowed down which vhost is misbehaving you may want to install and enable Xdebug 2(a PHP profiler/debugger). Debug should let you know which bit of code is blocking/causing issues.

Hope this helps.

share|improve this answer

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.