David G. Miller
2008-Oct-29 13:48 UTC
[CentOS] Possibly OT: intermittently long response times, when connecting to host
Craig White <craigwhite at azapple.com> 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. >> ><snip>> ---- > 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. Cheers, Dave Miller -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce
David Miller
2008-Oct-30 20:52 UTC
[CentOS] Possibly OT: intermittently long response times, when connecting to host
--snip--> > 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. > > Cheers, > Dave Miller > > -- > Politics, n. Strife of interests masquerading as a contest of principles. > -- Ambrose Bierce > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >We were thinking along similar lines and turned off caching. We also added the drupal 'devel' module. It can be set up to show all the DB calls a page is making. So far some slow queries, but nowhere near explaining the whole 10-12s. So far I've been able to rule out apache, php rendering, and DNS. It's almost definitely a MySQL connection issue, and I'm reasonably certain it's a php-mysql issue. Interestingly we've copied over the drupal install to Fedora 8 and Fedora 9 boxes and it runs like a champ. I've got a basic Drupal 6.5 install on my desktop (CentOS 5.2 x86_64) and it runs well. I'm in the process of installing CentOS 5.2 on another ESX VM to see if "something" was installed wrong, etc. Not ruling out operator error here. Nice to meet you as well, Dave. There certainly are a few of us floating around. Thanks. David M Miller