Jump to content


Help needed to trace php script containing infinite loop

  • Please log in to reply
1 reply to this topic

#1 Vikas Jayna

Vikas Jayna
  • Members
  • PipPipPip
  • Advanced Member
  • 121 posts
  • LocationNoida, Delhi, India

Posted 01 September 2006 - 10:30 AM

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!
Vikas Jayna,
Project Manager - Jeevansathi.com
7 yrs. exp. in LAMP
Certified Mysql DBA
Zend Certified Engineer

#2 Corona4456

  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 01 September 2006 - 06:22 PM

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...
What is the CoronaMatrix?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users