Possibly OT: intermittently long response times, when connecting to host
Craig White <firstname.lastname@example.org> wrote:
On Tue, 2008-10-28 at 16:30 -0500, David Miller wrote:
> I have a CentOS 5.2 server running Apache 2.2.3 (yum installed) and
> drupal 6.5 on ESX 3.5. We're using Name Based Virtual Hosting on it -
> 2 hosts. The problem is that when I pull up a web page after not
> having accessed it for ~15+ minutes it takes between 10-12s to load
> fully. The 2nd page, 3rd page - and sometimes more than that - take
> between 8-12 second. After that - decent performance, though not great
> (0.3s to 2s). Wait ~15 minutes, maybe more, maybe less, and it goes
> back to slow. While it's been most apparent with httpd, I've noticed
> similar slowness with the initial ssh session, etc.
sounds sleepy - perhaps the mysql connections drop after inactivity and
then it takes that long to connect
You might just want to set up a cron script that does a curl or wget of
a standard page every 2 minutes or so just to keep things active.
I'm working with some folks to develop a web site with a very similar
configuration (Apache, Drupal, MySQL, not sure which Linux distro is
underneath it all though) that's hosted by IX web hosting. We are
seeing very similar behavior. It has gotten better since we complained
to IX but we still see a significant lag the first time the site loads.
The fast load on subsequent visits could be explained by Drupal doing
some caching of needed items so it doesn't have to go to the database.
The initial site load time became much more noticeable after IX took
some kind of hit on their DB server. All we know is the site suddenly
couldn't connect to the database, they fixed something on their end and
the database came back but we've had the long lag for first load ever since.
BTW, pleased to make your acquaintance, Dave.
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce
CentOS mailing list