Jump to content

Help needed to trace php script containing infinite loop


Vikas Jayna

Recommended Posts

I am running a high traffic web server serving millions of pages per day.
The server runs apache 2.0 and php 4.3.2 is the scripting language. I am having hundreds of php scripts and there seems to be one or two scripts that are possibly containing an infinite loop. Every now and then I get apache to take up the entire resources of the machine and within a matter of a few minutes, a manual reboot is the only option left. I have put restrictions of memory limit as well as execution time in both php.ini as well as httpd.conf but even this does not solve the problem. Is their any method through which the script that is causing this problem can be traced?

Thanks in advance!
So the server doesn't even stop the script?  It should give you a fatal error of some sort, letting you know which one is the script that caused the problem.  Maybe your php log file will clue you in to what it could be... see if you can find something like:

PHP Fatal error:  Maximum execution time of 'n' seconds exceeded in <filename>

Just a thought heh...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.