Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 multiple virtual hosts set up. On one of them, let's say three out of ten page loads are basically instant. The other seven always take (pretty much) exactly 5 seconds of server lag (as opposed to data transfer).

It doesn't matter which page is loading, or whether or not it's a Drupal page.

There are a lot of requests each second, and I'm wondering if Apache is putting requests on standby until it's finished with the current queue, or something along those lines?


share|improve this question
Isn't something that is randomly predictable an oxymoron? – Naftuli Tzvi Kay Aug 7 '11 at 22:02
I guess so, what I meant was that it was random when it happened but you knew it would happen soon ;-) – Fela Maslen Aug 7 '11 at 22:37
Perhaps "recurring" or "recurrent" would be a better word. – Naftuli Tzvi Kay Aug 7 '11 at 23:01

It could be server queueing (server-status should tell you that), but from the precision and consistency of the delay, I'd be inclined to think it's probably rDNS lookups timing out -- which is why everyone turns it off (with HostnameLookups Off).

share|improve this answer
How would I turn off rDNS lookups then? :P – Fela Maslen Aug 7 '11 at 22:38
Hmm...hang on it looks like it is definitely a problem induced by high traffic from multiple sources. So I bet it must be server queuing. Maybe I could try raising the queue length, only thing is this is a single core 2.2GHz CPU... – Fela Maslen Aug 7 '11 at 23:18
If your server is overloaded, reduce the load (optimize, load balance) or get a bigger server. – womble Aug 7 '11 at 23:25
Sadly that's not an option so for now, I'm just going to live with the lag. Thanks for the help though :) – Fela Maslen Aug 8 '11 at 0:56

I'd have a look at mod_status to help debug the issue. It gives a good incite into what apache is up to, and can often indicate where to start debugging a problem (script/apache config/etc).

share|improve this answer
I heard about that but could never get it going. – Fela Maslen Aug 12 '11 at 0:16
@Fela - it should be pretty simple, once you have the module loaded just drop this config in: – Coops Aug 12 '11 at 5:14
Heh, I made a new directory and put that in the .htaccess and it finally works :P Thanks :) – Fela Maslen Aug 14 '11 at 15:15

Your Answer


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.