Been getting this error on my server all of a sudden -
Fatal error: Maximum execution time of -1 seconds exceeded in
This is happening inside my wordpress site. It shows up across many files so it's not isolated to one in particular.
Googling hasn't given me any results for the "-1 seconds" issue which is rather odd. I've tried increasing the time limit on the scripts but it doesn't resolve the issue.
I've found that refreshing the page many times will eventually give me the page I want.
I ended up reinstalling Wordpress, and I get the same issue again. I'm starting to think it's not a Wordpress issue, but have no idea where to start diagnosing the issue.
Try this in your php code(add top)
set_time_limit(0);
ini_set('max_execution_time', 0);
if you are getting error again and again increase the time limit and see
Related
Whenever there is set_time_limit(x) in PHP script, it causes PHP fatal error after 30s of max execution time.
Any idea what might be wrong? I am not using set_time_limit() function, but many WordPress plugins and WordPress upgrade core PHP files do, causing me a headache.
<?php
set_time_limit(300);
echo 'test';
?>
Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/test.php on line 2
Thanks.
The cause of the problem is slowness. Increase the parameter to something bigger temporarily, or comment out those lines altogether. When you have finished with this, optimize your project, so a request will not take so long and when you are comfortable with the performance, you can put back the time limits. Also, it might be worth to ask the authors of the plugins whether they will release a version where you can enable/disable this feature or set the time limit yourself.
In the past week, I started to receive the following message in the Laravel log, but there is nothing else on my stacktrace to give me any clue of what is going on. Any idea of what this could happen?
[2017-11-30 19:40:05] production.ERROR: Maximum execution time of 0 seconds exceeded {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Maximum execution time of 0 seconds exceeded at /var/www/html/app/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1201)
[stacktrace]
#0 {main}
"}
I'm currently using Laravel 5.5 and PHP 7.1.
I managed to solve the issue. I checked Apache error logs, and it showed me the URL where the error was and from that point, I was able to review what happened. And it was bug in our implementation that was causing a weird iteration that took a lot of time. Now, it's solved.
I have a php page that runs a number of loops and queries and database updates etc. It can take some time to run and after a minute, I get the 500 Internal Server Error. I don't have access to the logs but my hosting service has forwarded a copy and it seems that it is a timeout related error:
mod_fcgid: read data timeout in 60 seconds
I have included:
ini_set('max_execution_time', 9000);
set_time_limit(0);
In the php page but it still causes the 500 error. I can't access any of the config files. Is there any other way I can increase the timeout for this page?
I have also tried putting
set_time_limit(59);
at the start of each loop through. If this is meant to reset the clock then I can't see that I should have a problem but the error persists.
NOTE: I am 99% sure that it is not an error in the script itself as sometimes it goes through and other times times it doesn't with exactly the same data.
I am searching on Twitter Streaming api from last day but not exactly get to know how to use it. Finally I found 140dev streaming API framework. For this I followed every instruction from 140dev.com instructions. But when I run get_tweets.php file it display me an error
Fatal error: Maximum execution time of 300 seconds exceeded in
D:\xampp\htdocs\twitter-streaming\libraries\phirehose\Phirehose.php on line 741
I searched a lot on this and also increase max_execution_time from php.ini file but still the same problem.
when I go to admin option in drupal 6. I get following error on my Browser
Fatal Error: Maximum execution time of 30 seconds exceeded in
c:\wamp\www\drupal2\includes\common.inc on line 551
This error has started occuring after i install 'Views' module in my drupal 6 sites/all/modules folder.
why this is happening? Please Help.
Thank you.
Using wamp its pretty simple thing , Click on the wamp icon on taskbar, go to php and go to php.ini and then find max_execution_time and make 30 to 500 or more what u are comfort with.
in the wamp menu (click open the php.ini file and search for
max_execution_time = 30
and change 30 to 180 or more,
than restart your apache
Something about the 'Views' module is taking longer than 30 secs to process (Line 551). You can try to increase the maximum execution time by adding the following to your php script:
set_time_limit(int $seconds);
By default php is set to 30 seconds. Using the above command you can increase it incrementally to see if it will run. If you continue to get the same error I would suggest Isolating and fixing the script or uninstalling it.
Add following line in settings.php and then it will work without error
ini_set('max_execution_time', 0);