2

We're trying to find a bug that will cause multiple PHP processes to be run at the same time and thus eating up the CPU resources for around 5 minutes. During these 5 minutes, our server will totally inaccessible.

We can't seem to replicate the problem and not to mention seeing the same problem on our staging server. My question is will installing xdebug on our production server help us finding the root of the problem? Will xdebug affect our production servers performance?

Regards Joe Thong

  • @OMG Ponies, it is very likely that there is a code issue causing the high cpu issue. @user504789 I'm confused as to if it is happening on both servers or simply there production server? – evolve Nov 11 '10 at 17:07
  • You could check out some testing tools: http://www.opensourcetesting.org/performance.php I think this might work for your testing: http://p-unit.sourceforge.net/ but have never used it myself – Phill Pafford Nov 11 '10 at 17:39
  • @evolve, we are still not able to replicate this on the staging servers. –  Nov 12 '10 at 03:22

1 Answers1

1

in apache, set ExtendedStatus On if u have mod_status compiled - http://httpd.apache.org/docs/2.2/mod/mod_status.html#extendedstatus

with this, u able to monitor what are the URL that causing the infinite loop or spawn multiple background processes

or even simpler, log the time taken for apache to serve a single page - http://httpd.apache.org/docs/2.2/mod/mod_log_config.html %D or %T and diagnose the log file

ajreal
  • 183
  • 12
  • thanks, but I forgot to mention we're using IIS 6, any similar tools or options? –  Nov 12 '10 at 03:23
  • @sujoe : it should has mod_status compiled, try `apache -l` to list module compiled, or simply start tracking the page processing time in your apache log –  Nov 12 '10 at 04:38