Re: Scripts taking too much time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/18/06, Chris <listschris@xxxxxxxxxxxxxxx> wrote:

Hi,

I'm hoping somebody can give me advice on how I can go about debugging a
problem I've been having. The bottom of this email has some of the
details of my system.

There is an intermittent slowness throughout my site. At seemingly
random points in random scripts at random times it just seems to wait.

A few of these have been as long as 600 seconds, just sitting there,
apparently doing nothing. I've tried tracking down the problem using
microtime(), that jsut showed me how (mostly) random it was. The least
complex area in which I was able to isolate a problem was a 15 line
chunk of HTML, with some <?=MY_CONSTANT?> in them.

I'd appreciate any advice or suggestions, thanks!
Chris

==[Details]===================================================
I've compiled both Apache and PHP, neither are RPMs:

Apache 2.0.55 (Compiled with mod_prefork)
PHP 5.1.2 (module)
CentOS 4.2 (Essentially a repackaged Red Hat Enterprise 4)

I'm averaging  about 2 requests a second, spiking occasionally to 10 per
second, but not very often. At no time is anything on the server "maxed
out" CPU sometimes gets to 20%, memory never hits swap (at least not
that I can see), disk activity is minimal (my database is not on the
same server).

My site has a decent amount of includes, it's probably doing 30-40
includes per request, with an occasional require or two.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


If you have a dev site you might consider using Xdebug's profiling features
(http://xdebug.org/docs-profiling.php) to see every function call, include,
etc to figure out where the bottleneck is happening.  This might point you
in the right direction in finding out why something is being slow.

One cool thing is that you can set Xdebug to automatically generate
cachegrind files for each request since your problem seems to be
intermittent.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux