First request hangs

Ive currently got LSWS setup on Cloudlinux, and having an issue that is really bugging me.

The first request to a website will take very long. I tested one on pingdom and it took 6 seconds, simply re-testing right after and it loaded in less than half a second consistently. Ive tested this enough to confirm this is an issue across any site on the server.

I originally thought it may have been an opcode cache issue. I replaced eaccelerator with APC, disabled LS cache, disabled memcache.. No luck yet.

Has anyone else experienced this? Everything is up to date. Thank you.

Appreciate the response.
I have had issues previously where phpinfo page took time to load as well.
SQL is on the same server, and have never experienced the problem of taking time to "warm up". If such is the case, I find it odd it would only occur in conjunction with LS.

As I write this post, I am not having any issues.
For what its worth, I have created a ramdrive for the gzip and LS cache directory. Doubt its of any relevance, but will put this in for future documentation.

SQL is on the same server, and have never experienced the problem of taking time to "warm up". If such is the case, I find it odd it would only occur in conjunction with LS.

Click to expand...

if there are hundreds of databases in the SQL server, for 1st access of a low traffic site, it need load the database from hard disk into memory, and this may take long time if a)memory is not enough or b)disk I/O happen to be high at that time. for 2nd request which has database access, since the database already in memory, so no loading overhead and response fast. so please monitor the database performance as well and enable slow query log. also good idea to monitor the disk io and disk swap status. if disk swap happen, it's sure you'll feel the slowness of a website.

Certainly makes sense. However, the server is a dual quadcore with raid10 15k SAS drives, and only have about 4 accounts on it right now - with a single one live or active.

Now that I think of it, something that may affect this is the IO setting in CloudLinux. I currently have this set rather low for testing IO requirements - around 128 or 256. Ill do more testing with this and report back.