Re: Scripts taking too much time

From: Date: Tue, 19 Sep 2006 01:11:20 +0000
Subject: Re: Scripts taking too much time
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-241918@lists.php.net to get a copy of this message
Richard Lynch wrote:
On Mon, September 18, 2006 11:54 am, Chris wrote:
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.
    
Are you running any of the cache programs such as APC/Turck/Zend Cache? I was running Zend Platform, and thus, I believe, Zend Cache, I've disabled it for now and I don't think it's the cause of my problem..
Or the Zend Optimizer? So is the optimizer, though I suppose I could try enabling that and see what happens.
Try disabling those and re-running the tests, just to be certain it's not the cache acting up. I'd also suggest trying some other tools to monitor the activities -- just in principle, to be certain that the monitors themselves are accurate. I have no particular package in mind -- Just that two heads are better than one when trying to view what's happening at that level of detail. That's part of my problem, I'm nto sure what sort of tools I need to be monitoring what... I just don't know many places my problem *could* be.
My site has a decent amount of includes, it's probably doing 30-40 includes per request, with an occasional require or two.
    
Just in general, I'd suggest that 30-40 includes per request is a bit excessive... Can none of them be combined? I do intend to streamline the whole site, but it's not feasible to do it now. I see the includes as being more of a possible trigger than the full cause of my problem.
I *believe* the big "hit" for an include is in the disk seek, not reading and parsing some bits of PHP code. I'm not really great at reading iostat, but to the best of my knowledge the hard drives are hardly even being used
This is not likely to be at all related to your current issue -- just a general observation. Thanks for the reply.
Chris

« previous php.general (#241918) next »