Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this website which works very smoothly but occasionally when I click a link it pause for around one minute before I get the page, and when I open the same page in a new window, it open smoothly without any delay.

Any ideas on what could cause this?

My environment:

  1. FreeBSD
  2. PHP
  3. MySQL
  4. Lighttpd
share|improve this question

First you have to check, if this is a server related problem. Does it happen the same way regardles of where you check it from? Try multiple browsers on different computers. One of the main reason for such behaviour is failing DNS server (for either client, or server).

share|improve this answer
I tried it from multiple machines same thing. I don't think it is DNS, the pause happens while clicking different links in the website, so it must be cached, plus opening the same pause link in a new page will open it immediately. – user15910 Sep 4 '09 at 22:01

This is somewhat of a broad question as it could really be anything in between the client and the server. You will need to follow some specific methods for network problem resolution. We all have our ways, there's even a server fault wiki about different ways towards approaching a problem.

I recommend checking that SO question and becoming familiar with Wireshark or TCPDump, as these tools will help you figure out what's happening in the server <---> client communication, and hopefully see where that 'pause' is happening at by looking at the packet response timings. Also, check to see if you see any kind of errors at the server's logs.

share|improve this answer

This could be a whole plethora of different reasons. DNS not resolving on the first try, PHP not responding as fast due to load, lighttpd too many connections.

Does the page show up instantly when you hit the refresh button? Have you tried seeing what is going on at the server end at the same time? What does your network traffic look like?

I would start looking at the log files for Lighttpd at the time of the incidents, and look for PHP processes that have failed or fallen over on themselves which has caused lighttpd to respawn them. This could cause the issue.

share|improve this answer
The CPU is 80% idle so I doubt it is a matter of high load! Lighttpd isn't complaining about anything in the log (only PHP warning and errors). "Does the page show up instantly when you hit the refresh button?" Sometime it does, sometimes it doesn't, although other pages would load normally. Thank you – user15910 Sep 4 '09 at 22:12

I experienced similar behaviour on a site and found out that simply the responding apache process becomes killed by an out of memory condition occassionally. Not sure yet why or when that happens - but keep an eye on the server if probably web server processes die or get killed... Your "1 minute" observation pretty much fits into that type of problem as this may be around the amount of time before your browser gets a timeout and re-requests the data.

share|improve this answer

I think you should take a look at the Keep-Alive settings of Lighttpd:

server.max-keep-alive-requests =
server.max-keep-alive-idle = 
server.max-read-idle = 
server.max-write-idle =
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.