PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Re: PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Post by smileymind »

Howie wrote: Thu Jan 21, 2021 4:50 am Having two pollers running at the same time is almost certainly bad.

I only had a brief look at the map, and it seems pretty normal, even if it's quite big. I noticed there is no rrd_use_poller_output in it though - did you do that in the map settings? What was the render time for the map before you did it? (grep "run complete" cacti.log should tell you)
Hi Howie,
I already enabled rrd_use_poller_ouput, before and after enable it seems the same around ~32 seconds. Please see log in attached. Right now it seems quite better as it stucks 1 in 10 polling, so we can say 1% error in 10 polling. Thanks.
Attachments
run_completed.txt
(765.76 KiB) Downloaded 110 times
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Re: PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Post by smileymind »

Badikov wrote: Thu Jan 21, 2021 2:49 am In /etc/php/versionNumber/apache/php.ini

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

And the same parameter in /etc/php/versionNumber/cli/php.ini

Try to change, may be it will help you.
Hi,
I already tried that but it still shows error sometime and map freeze until next polling run complete.

Thank you,
smileymind
Posts: 25
Joined: Thu Oct 08, 2020 1:30 am

Resolved: PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Post by smileymind »

smileymind wrote: Wed Jan 13, 2021 5:46 am Dear All,

Could anyone help my php error with WeatherMap? When alarm happen WeatherMap freeze not display any map, I tried to research many days but couldn't find solution :-(, I am so happy if anyone can help me.

CACTI version:Version 0.8.8h
OS:centos-release-7-9.2009.1.el7.centos.x86_64
DB: mariadb.x86_64 1:5.5.68-1.el7
PHP:PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
--------------------------------------------------------------------------------
[13-Jan-2021 17:33:28 Asia/Phnom_Penh] PHP Fatal error: Maximum execution time of 59 seconds exceeded in /var/www/cacti/plugins/weathermap/lib/HTML_ImageMap.class.php on line 422
---------------------------------------------------------------------------------
Now all issues have gone away just simple change on SNMP waiting response time out, set the max waiting 300ms only so my polling will shorter than one minute and the weathermap also load faster.

Thank you all for your support. :-)
Attachments
MicrosoftTeams-image (1).png
MicrosoftTeams-image (1).png (58.56 KiB) Viewed 9755 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Post by Howie »

If that has reduced your polling time, then surely you have data that is not being collected now? (that is, it is hitting that new timeout)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: PHP Fatal error: PHP Fatal error: Maximum execution time of 59 seconds exceeded

Post by phalek »

If reducing the timeout solves your problem, then you should check which devices are actualy not repsonding to SNMP requests. A previous post already showed that you're hitting the 60 Sec polling time, so you are missing data before changing the timeout already.

Thry sorting the devices by response time and go through each of these to check their SNMP reachability. Also check if slightly increasing the MAX OIDs to something higher then 10 may help resolving polling times. I think 0.8.8h should allow doing this on a by-device basis.

There's a plugin available which may help you for the getting the best MAXOID setting per device: https://github.com/patrickscottbest/hammerOID
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests