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: Apache deadlock?
Author
implicit



Joined: 19 Feb 2013
Posts: 4

PostPosted: Tue 19 Feb '13 17:33    Post subject: Apache deadlock? Reply with quote

First off I'd like to ask for a bit of forbearance for a new and inexperienced user. This whole web business seems to be a world of its own.

Anyway, we're having a bit of trouble with our Apache server (WAMP version 2.2, Apache 2.4.2) running on Windows Server 2008 SP1 (x64). Basically the server intermittently goes into a mode in which every request takes a very long time to serve. The server still works, but it takes on the order of an hour from opening any connection and sending a request until the response.

This happens every week or so, and goes away once the server has been restarted. I cannot find any messages in the Apache error log, nor any visible activity from the server processes while they are running. It happens when serving the PHP pages making MySQL accesses as well as when serving static content, both from the public Internet as well as on local connections.

This is on a small, lightly used (a peak of perhaps five simultaneous users) server with a bog-standard configuration. Curiously there's also a development machine running the same application, though accessing the production database, on which the problem has yet to manifest itself.

For the record we reinstalled WAMP earlier today and have yet to be able to reproduce the problem since.

Any ideas on what could be going on, how we might track down the problem, or even reproduce it would be most welcome at this stage.
Back to top
cbj4074



Joined: 02 Nov 2012
Posts: 24
Location: United States

PostPosted: Thu 21 Feb '13 0:15    Post subject: Reply with quote

I doubt that this is the cause, but to eliminate it, change all "localhost" references to "127.0.0.1", especially where your MySQL connection parameters are concerned. (This should be done regardless of whether or not it is a factor in your particular case.)
Back to top
implicit



Joined: 19 Feb 2013
Posts: 4

PostPosted: Thu 21 Feb '13 10:44    Post subject: Reply with quote

cbj4074 wrote:
I doubt that this is the cause, but to eliminate it, change all "localhost" references to "127.0.0.1", especially where your MySQL connection parameters are concerned.
Thanks, I'll do that. We're already using 127.0.0.1 for accessing the database but I'll grep the configuration files and pages for any localhost references.

A quick bit of Googling reveals that Windows may suffer from a bit of IP4/IP6 confusion when referring to "localhost" (whereas MySQL on Unix systems use UNIX sockets instead of TCP/IP in the same case.) Would that be the issue?

You'd have thought that something would have timed out long before the 40 minute mark, but perhaps there's a configuration issue or a long chain of cascading retries in there somewhere.
Back to top
cbj4074



Joined: 02 Nov 2012
Posts: 24
Location: United States

PostPosted: Thu 21 Feb '13 17:06    Post subject: Reply with quote

That's exactly right, regarding the IPv4/IPv6 issue.

And yes, that was my next thought, too: why no timeout?

So, the logs (access_log or error_log) reveal nothing useful? Have you increased Apache's logging verbosity to its maximum value?

The fact that you can't reproduce this at will, and the fact that it may take several days to rear its ugly head, makes this difficult to debug (as you well know by now).

Has the issue recurred yet since re-installing your stack?

Finally, have you dug into the Apache process(es) with something like Sysinternals' Process Explorer? If so, how's memory usage look? Normal?
Back to top
implicit



Joined: 19 Feb 2013
Posts: 4

PostPosted: Thu 21 Feb '13 17:42    Post subject: Reply with quote

cbj4074 wrote:
So, the logs (access_log or error_log) reveal nothing useful? Have you increased Apache's logging verbosity to its maximum value?
No, unfortunately not, just regular accesses. We did try temporarily bumping it to trace6 but still no errors or anything like that.

cbj4074 wrote:
The fact that you can't reproduce this at will, and the fact that it may take several days to rear its ugly head, makes this difficult to debug (as you well know by now).

Has the issue recurred yet since re-installing your stack?
Yeah Sad

For all I know the latest reinstall may have fixed the problem, but it's hard to relax until you've figured out what was going on.

cbj4074 wrote:
Finally, have you dug into the Apache process(es) with something like Sysinternals' Process Explorer? If so, how's memory usage look? Normal?
We took a peek the last time it happened. The memory usage was quite normal and the processes weren't eating CPU time or performing I/O.

The threads were waiting on a lock of some sort, but I could tell whether or not there was a deadlock (we were under some pressure to restart the server to get it running again.)


Any suggestions for further tests to run if or when it happens again?
Back to top
cbj4074



Joined: 02 Nov 2012
Posts: 24
Location: United States

PostPosted: Thu 21 Feb '13 18:15    Post subject: Reply with quote

When you make a request to the server, is the access attempt logged immediately? Or does this take an hour to happen?

Last edited by cbj4074 on Thu 21 Feb '13 18:54; edited 1 time in total
Back to top
implicit



Joined: 19 Feb 2013
Posts: 4

PostPosted: Thu 21 Feb '13 18:26    Post subject: Reply with quote

cbj4074 wrote:
When you make a request to the server, is the access attempt logged immediately? Or does this take an hour to happen?
Excellent question.

Unfortunately I can't really tell at this stage, but I'll check it out next time it happens.
Back to top


Reply to topic   Topic: Apache deadlock? View previous topic :: View next topic
Post new topic   Forum Index -> Apache