[SOLVED] serious lag time between Apache request & respo

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

[SOLVED] serious lag time between Apache request & respo

Post by RobertGonzalez »

Ok, this one has me really stumped. I am currently running Apache 2.2.2 with PHP 5.1.6 hitting both a Sybase database (12.5 Client) and MySQL database (5.0.22 Client) on a Fedora Core 5 machine. Today I noticed serious lag time between the Request and the Response and I cannot figure out why.

My page timer is showing page build times at about 0.0125 seconds with 13 Sybase queries and 8 MySQL queries (all stored procs). Inspecting the headers I can see the /GET request going out immediately on the click of a link or call of an URL, but the response headers don't come back for anywhere between 3 and 6 seconds. When the response headers come back, the entire page comes back as requested.

I didn't notice this until today, but this could have been going on for who knows how long. I tried connecting to my site (this is a dev site by the way) using both our proxy network connection and our non-proxy connection with the same results. I restarted Apache and had the same results. I rebooted the entire machine and still had the same results.

I also called a static HTML page and a phpinfo() PHP page, and they loaded immediately with no lag between request and response. I have called my Sybase and MySQL procedure test pages and they seem to load immediately as well. That makes me believe that there is a problem with my code, but there has been nothing done to it that would have significantly changed it to do this.

As a benchmark, I called several other cached and non-cached web sites, and though I noticed a similar lag in load times with these benchmarks, the request and response headers were immediate.

Does anyone have any clue what I should be looking for in my troubleshooting efforts? 3 to 6 second page load times are killing our entire testing process.

Thanks in advance for any help you can offer.

PS I cleared my browser cache in all browsers and still had the same results.
Last edited by RobertGonzalez on Wed Jun 27, 2007 12:03 pm, edited 1 time in total.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

The only tip is to comment entire script and then uncomment lines one by one
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

After several different channels of trying to figure out what the crap happened, we have narrowed it down to a row-level locking transaction issue with Sybase in one particular procedure. Thanks for the input, it was much appreciated.
Post Reply