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 have Apache 2.2.11 installed locally on my Windows XP (SP3) dev machine, which I setup about 3 months ago.

I have just started having a strange problem in the last few week.

Apache is serving some basic PHP applications like phpMyAdmin. When I make a page request, Apache appears to not finish serving all resources for that page. Firefox shows the "Transferring data from servername..." message, and the page never completes. The same problem happens in Internet Explorer too.

I can sometimes tell which resource it is waiting on, because most of the page will render except for some image or similar resources. (Not sure why Firebug doesn't show this)

It doesn't have the problem every page request - for page requests where most of the resources are cached in my browser, the page request will work with no problems. Or pages that are very light will work with no problems.

However, if I "hard" refresh the page, I will have this problem (probably because it is requesting all page resources)

Does anyone know what this could be?

It is so strange that it has only just started happening - and I did not make any changes to my system (that I am aware of)

I tried playing with the Apache ThreadsPerChild setting, but it did not seem to make a difference.

UPDATE:

I have been doing some more tests. I have been serving the most basic of pages, just a plain HTML file:

<html>
<body>
    <h1>testing</h1>
</body>
</html>

If I request this page multiple times in a row, AND each request occurs immediately after the previous has completed, then 50% of the time the request will time out.

However, if I put a 1-2 second gap between requests, then there is no problem.

This correlates to what I have observed when the brower requests a real application page. When the browser has nothing cached, then all of the page resources are requested from the browser in a short amount of time - this appears to trigger the problem.

UPDATE2:

Nathan Long has helped me understand the issue a little better with the server-status page (see below).

It is weird, it is like the server has a hickup sending data to the client. The client sits there waiting forever for data that never arrives. Closing the client process does not terminate the connection on the server - the server still has active threads for each previously attempted connection, but they just sit there - not sending any data and never terminating. (even though the client is now closed) Only a restart of the server seems to terminate them.

share|improve this question
    
Anything out of the ordinary in the Apache error log? We actually had somewhat-random segfaults in mod_php several years back that had a similar symptom. –  ZoogieZork Dec 18 '09 at 6:48
    
No, I can't see any errors that would be causing any problems –  asgeo1 Dec 20 '09 at 21:37
    
Can you duplicate my test below? –  Nathan Long Jan 12 '10 at 22:51
    
Yeah, this is exactly what is happening to me –  asgeo1 Jan 13 '10 at 11:46
    
With great trepidation, I just posted our issue to the Apache mailing list. –  Nathan Long Jan 13 '10 at 16:35
show 2 more comments

2 Answers 2

up vote 1 down vote accepted

Update - Fixed!

William Rowe from the Apache mailing list gave me the answer, which apparently is a known thing.

XP [personal operating system] only supports two simultaneous applications of the TransmitFile API. Please try the 'stock answer' of 'EnableSendfile Off' in your config.

With that change, this issue has disappeared for me.

Original Answer

Having the same problem - using Apache 2.2.14 on Windows XP. I had to use a slightly longer (but still very basic) static HTML file to get the load problem, but it does happen.

I just enabled the localhost/server-status page using conf/extra/httpd-info.conf (you have to enable a couple of modules in the main config file, too) and I noticed that each time the loading problem happens, the number of requests being processed goes up by 1, and the number of idle workers goes down. This is true even if the 'infinite load' is on the server status page itself - I hit refresh, and it loads successfully and instantly, with one more request being processed.

Each of the requests being processed shows a status of 'sending reply.'

I also turned on ExtendedStatus in httpd.conf, and now I see detailed info on each request being processed. Many have been in progress for several minutes, and many of those have transferred 0.0 kilobytes since starting.

I'm not sure what to make of this.

Detailed Instructions for server-status

You can make a server status page available at http://your.server.name/server-status by doing the following:

1) Enable mod_status and mod_info (for additional info) in httpd.conf

2) Also add Include conf/extra/httpd-info.conf, OR add the following directives (which is what httpd-info.conf contains):

# Turn on server status
<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from localhost
</Location>

# Enable more status info
ExtendedStatus On

3) Restart Apache and load the status page.

share|improve this answer
    
Thanks, I didn't know about the server-status page, but it is helping shed some light on the problem. –  asgeo1 Jan 13 '10 at 11:53
    
Thanks for the updated answer. This does the trick :D –  asgeo1 Jan 13 '10 at 21:45
add comment

Check your Apache Error Logs do you see anything like "Out of child proceses try increasing Max Servers"? If so then you are running into an issue of to many open connections to the machine.

You can also check your PHP to see if it has any long running processes, if there are you might need to increase the script_timeout value in your PHP.ini.

Also make sure your PHP is logging errors and make sure the script itself isnt exiting with errors.

You can create a simple test.html with static content version of the page and see if it loads properly repeatitly, if it does then it is not Apache (persay).

share|improve this answer
    
I can't see any messages like that in the Apache log. I have done the static html test, and I get the same problem, so it is definitly Apache, rather than PHP that is causing the problem. –  asgeo1 Dec 20 '09 at 22:01
add comment

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.