logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: What's the best way to find out why a server has hung?
Author
andy_baptiste



Joined: 07 Mar 2012
Posts: 3
Location: GB, Leeds

PostPosted: Wed 07 Mar '12 20:51    Post subject: What's the best way to find out why a server has hung? Reply with quote

Hello everyone! Smile

Sorry to be asking such a basic question but I was wondering what is the best course of action to work out why an Apache server has hung.

I do the programming side but often can't see anything in the PHP logs that gives me any clue what the problem was caused by.

For example, is there a seperate Apache error log that I'm posssibly going to have access to,where would I look for it, and might it give me a clue that the php log wouldn't?

Many thanks!
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 07 Mar '12 23:55    Post subject: Reply with quote

Yes there is an Apache error log, in Windows it's in
%ApacheRoot%/logs/error.log

It may tell you something, may not.
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Tue 13 Mar '12 10:52    Post subject: Reply with quote

The location is already mentioned in the other reply. The combination you are having (PHP / Apache) is very common.

When a web site does not return you would check 3 places (or even more).

1) of course the PHP error log
make sure your PHP.ini (during development) has the error reporting directives configured correctly
2) the Apache error log. This will typically contain errors that are reported by the PHP interpreter when it parses your code.
3) the Apache access log. This is in the same directory as the error log by default. You would check the logs based on time stamp. If the access.log contains a log entry which refers to your code and the error log does not, then the Apache log will not help you. The error must be somewhere else.

Hang problems are sometimes caused by external programs that do not close properly. I sometimes run into hang problems when I do system calls and during development these do not work properly. So every system call leads to an unterminated cmd.exe. You would find out via the task manager.

Best regards
Maba
Back to top


Reply to topic   Topic: What's the best way to find out why a server has hung? View previous topic :: View next topic
Post new topic   Forum Index -> Apache