php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43147 Random "PHP Fatal error: Maximum execution time of 60 seconds exceeded"
Submitted: 2007-10-30 17:52 UTC Modified: 2008-05-27 01:00 UTC
Votes:14
Avg. Score:4.5 ± 0.8
Reproduced:10 of 12 (83.3%)
Same Version:5 (50.0%)
Same OS:4 (40.0%)
From: marquinhocb at hotmail dot com Assigned:
Status: No Feedback Package: Performance problem
PHP Version: 5.2.5 OS: Windows Server 2003 R2 x64
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marquinhocb at hotmail dot com
New email:
PHP Version: OS:

 

 [2007-10-30 17:52 UTC] marquinhocb at hotmail dot com
Description:
------------
I can only get this to happen on a production server.  It may have to do with the server load.  I have the exact same setup on my local machine, never experienced this problem.

Server is a Dual-Processor Xeon Dual Core (4 cores in total).

I am willing to debug and help in any way necessary, I am a professional software engineer.

After getting these errors, I made my own extension with extended debugging information to help trace the problem.

Reproduce code:
---------------
Nothing special about the code causing the stall, as you can see:

windowmanager.class.php:
304: if (! $this->hasFooter)
305:	print("</div>"); //content

menumanager.class.php:

81: else if ((count ($j->subItems) > 0) || ($j->forceSub))
82:	{
83:		print("<a class=\"menuItem\" href=\"\" onclick=\"return false;\" onmouseover=\"{$this->menuBarVar}.MenuItemMouseover(event, '{$j->id}');\">");
				

Expected result:
----------------
The stall always seems to be on a print(), and obviously this should not be a stalling or very intensive function.

Actual result:
--------------
[30-Oct-2007 09:22:48] PHP Fatal error:  Maximum execution time of 60 seconds exceeded
End() 
End() 
End() 
 in D:\yuniti\includes\windowmanager.class.php [/index.php] on line 305

[30-Oct-2007 09:39:24] PHP Fatal error:  Maximum execution time of 60 seconds exceeded
InternalOutputItem() 
InternalOutputItem() 
InternalOutputSubItems() 
Output() 
Output() 
Output() 
 in D:\yuniti\includes\menumanager.class.php [/user.php] on line 83

[30-Oct-2007 09:42:02] PHP Fatal error:  Maximum execution time of 60 seconds exceeded
InternalOutputItem() 
InternalOutputItem() 
InternalOutputSubItems() 
Output() 
Output() 
Output() 
 in D:\yuniti\includes\menumanager.class.php [/user.php] on line 83

[30-Oct-2007 09:47:08] PHP Fatal error:  Maximum execution time of 60 seconds exceeded
End() 
End() 
End() 
 in D:\yuniti\includes\windowmanager.class.php [/index.php] on line 305

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-30 22:08 UTC] jani@php.net
It's pretty normal that sometimes things take time, especially with high load if the scripts are "heavy". Have you tried increasing the max_execution time in your php.ini? Also, you didn't give any information about your setup, like what webserver you're using, whether you use FastCGI/CGI or some module?
 [2007-10-30 23:51 UTC] marquinhocb at hotmail dot com
That's the weird thing - it's almost like an infinite loop.  If I increase the timeout to 120 seconds, or 240, or decrease it to 30 seconds, it continues to stall in similar lines: always on a call to print()

Terribly sorry, here's the info:
Apache 2.2.4
PHP Apache Module
 [2007-10-31 10:15 UTC] jani@php.net
With this information it's impossible to figure out what's going on.
Are you by any chance using some Zend extensions, like APC or some other cache?
 [2007-10-31 11:35 UTC] marquinhocb at hotmail dot com
I have a few zend extensions, but no caching ones.  My list of extensions:

php_curl.dll
php_imap.dll
php_mbstring.dll
php_mysql.dll
php_mysqli.dll
php_openssl.dll
php_mailparse.dll
php_geoip.dll

And yes I know that with the information I've provided, not much can be done to fix the issue.  I would simply like some direction/tips/feedback on what a good way to debug or find more information, so that I can help the PHP community to possibly fix this bug, or at the very least provide more useful information.
 [2007-10-31 12:40 UTC] jani@php.net
First of all try disabling all 3rd party extensions, loaded with extension and zend_extension.
 [2007-10-31 13:43 UTC] marquinhocb at hotmail dot com
Problem is, like I said, this is on a production server, I can't get it to happen anywhere else (with the same extensions).  And even on the production server it happens rarely.

My guess is that this is a bug present in PHP that's extremely difficult to reproduce, and that the conditions of my production server make it easier to reproduce.

If I remove the extensions, this will break the site, and so it is not a possibility.

Not to mention: if it doesn't make the issue go away, we'll be in the same position.

So, in essence I need help tracking this down so I can provide more useful information.
 [2007-11-11 19:04 UTC] jani@php.net
Until you have ruled out any interference by 3rd party extensions, keep this in feedback mode.
 [2008-04-23 14:24 UTC] marquinhocb at hotmail dot com
I have been able to get a setup without any PHP extensions installed (on a seperate server, with similar setup), and I am still able to reproduce the issue.

Using PHP 5.2.5.

Maximum execution time of 60 seconds exceeded in C:\sites\tgh\index.php on line 22

At line 22:

include 'includes/right.inc.php';

All I need is help tracking down this issue with some advice.  I am a C/C++ developer and familiar with the inner workings of PHP and how to compile, just need advice on how to instrument PHP code to track this down. Thanks.
 [2008-05-19 22:54 UTC] jani@php.net
First you should compile PHP in debug mode and preferrably use the latest release: 5.2.6 too..
 [2008-05-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-07-13 20:44 UTC] kirkshafonsky at hotmail dot com
Did you ever solve the problem?  I have the same problem on my webserver Win2k, using PHP5.2.5 and MySQL5

I have been searching for a solution.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC