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!
Link to comment
Share on other sites

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...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.