1

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?

Cheers

3
  • 3
    Isn't something that is randomly predictable an oxymoron? Aug 7, 2011 at 22:02
  • I guess so, what I meant was that it was random when it happened but you knew it would happen soon ;-) Aug 7, 2011 at 22:37
  • Perhaps "recurring" or "recurrent" would be a better word. Aug 7, 2011 at 23:01

2 Answers 2

0

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).

4
  • How would I turn off rDNS lookups then? :P Aug 7, 2011 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... Aug 7, 2011 at 23:18
  • If your server is overloaded, reduce the load (optimize, load balance) or get a bigger server.
    – womble
    Aug 7, 2011 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 :) Aug 8, 2011 at 0:56
0

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).

3
  • I heard about that but could never get it going. Aug 12, 2011 at 0:16
  • @Fela - it should be pretty simple, once you have the module loaded just drop this config in: pastebin.com/vz5H5QyW
    – Coops
    Aug 12, 2011 at 5:14
  • Heh, I made a new directory and put that in the .htaccess and it finally works :P Thanks :) Aug 14, 2011 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .