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 strange problem with my website. If I navigate through links inside the website everything is fine, and pages load fast. If I hit the refresh button on the browser on any page, the page load is slow and it hangs (not at the same moment every refresh), and it keeps loading forever. Despite the spinning reload icon on address bar, firebug does not show any hung connection.

I tried FF/Chrome on MacOSX/Win/Linux and I get the same behaviour, so I suppose is something related to my web server.

Is it possible I made some mistakes on tuning apache settings (such as KeepAlive / MaxClients)? I currently use Apache2 with prefork module, on a dedicated 8 core i7 server with 16GB RAM.

Prefork settings:

<IfModule mpm_prefork_module>
    ServerLimit          500
    StartServers         40
    MinSpareServers      40
    MaxSpareServers     100
    MaxClients          400
    MaxRequestsPerChild  4000
</IfModule>

Other/KeepAlive settings:

Timeout 300
KeepAlive On
MaxKeepAliveRequests 500
KeepAliveTimeout 4

Is it possible that the problem is completely unrelated to these settings, so I ask you: can you address me on the right place to look or how to perform further tests to understand how to solve it?

share|improve this question
    
Have you asked other people to try and reproduce the problem on their machine? Might still be a local issue. And does this problem also appear on other vhosts on the same server? (If there is more then one). –  Oldskool Feb 2 '12 at 21:42
    
the three OS/browser versions I tried were on three different machines. Actually, same connection. Now I'm back home and tried from here (same provider, different connection) and I still experience this issue. I hope is something local, but still don't know how to be sure of it. –  lorenzo.marcon Feb 2 '12 at 21:51
add comment

1 Answer

Have you tried to clear your browser's cache and navigate through the web site links?

Perhaps your browser's cache is responding to your http requests instead of the web server itself and that's the reason why pages load fast.

A different situation occurs when you hit the reload button. By doing so, your browser won't serve the request using its cached content. In this case, if I'm not wrong, a HTTP request with the no-cache directive is generated and the content will need to be validated on the web server.

In order to reach the web server, your browser will need to resolve the name of your web site to an ip address and I believe that here is where your problem resides: DNS.

Take look at how long your machine is taking to resolve the name of your web site. If it's taking too long, you've found your problem.

share|improve this answer
    
Actually it's pretty fast to resolve the domain. This issue only happens on my website. –  lorenzo.marcon Feb 2 '12 at 18:46
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.