-
-
Notifications
You must be signed in to change notification settings - Fork 427
Description
I have a setup with one main poller and 2 additional pollers. With boost enabled.
Upgraded recently from 1.2.18 to 1.2.19, I was running spine 1.2.16, becouse more recent version (1.2.17 or 18) was giving errors, now I'm running both cacti and spine 1.2.19. Apparently spine ends without problems but process "php /opt/cacti/poller.php" is unable to finish in main poller, and keeps there eating memmory and cpu. Ends up being killed after 299 seconds. Weirdly enougth 3 of that process are running at the same time, wich is strage having they are killed after 299 seconds, and cron is set to run every 300 seconds.
It happends every polling interval. spine ends up on all pollers without apparent problems, but cmd.php keeps running on main. Most of the actual polling is run on one of the remote pollers, main poller have no device associated (now it has one for testing).
For a typical polling this is the final outout I see on the log file of each poller
poller 01:
2021/11/08 14:30:41 - SYSTEM STATS: Time:38.2217 Method:spine Processes:1 Threads:30 Hosts:170 HostsPerProcess:170 DataSources:20848 RRDsProcessed:0
poller 02:
2021/11/08 14:30:07 - SYSTEM STATS: Time:5.1605 Method:spine Processes:1 Threads:30 Hosts:27 HostsPerProcess:27 DataSources:468 RRDsProcessed:0
main poller:
2021/11/08 14:30:03 - SPINE: Poller[1] PID[5695] PT[140715085393664] Time: 0.5676 s, Threads: 30, Devices: 1
2021/11/08 14:30:03 - SPINE: Poller[1] PID[5731] PT[139950535016192] Time: 0.5673 s, Threads: 30, Devices: 2
after a time i'll see a timeout line, but weirdly more like 10 minutes after start (not 5, but log says timeout after 299 seconds):
2021/11/08 14:39:55 - ERROR PHP ERROR: Maximum execution time of 299 seconds exceeded in file: /opt/cacti/lib/poller.php on line: 462
2021/11/08 14:39:55 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
When this apparently zombie poller.php are running mysql cpu usage goes up (and stays there as for the time a process is killed up to new 3 process will be up).
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3521 mysql 20 0 2827852 837396 24028 S 103,6 20,83 56:01.36 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql
5659 wwwrun 20 0 353616 224988 17760 R 52,32 5,596 2:54.58 php /opt/cacti/poller.php
5815 wwwrun 20 0 329912 201416 17748 S 42,72 5,009 0:23.14 php /opt/cacti/poller.php
I stopped cron calls to poller.php on all 3 servers, changed poller to cmd.php and tried to run: poller --debug --force but I see no logging lines. Tried this also with debug level set to maximum (DEVEL) on the webui settings, but made no difference.
sudo -uwwwrun php /opt/cacti/poller.php --debug --force
2021/11/08 12:05:08 - POLLER: Poller[1] PID[3135] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '72.33', Max Runtime '298', Poller Runs: '1'
2021/11/08 12:05:09 - POLLER: Poller[1] PID[3135] WARNING: Poller Output Table not Empty. Issues: 0, DS[64, 74, 23793, 24258, 864, 20776, 24410, 22623, 8301, 8302, 23817, 23817, 23818, 23818, 23819, 23819, 20776, 8301, 20775, 24411]
2021/11/08 12:05:10 - POLLER: Poller[1] PID[3135] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/spine/bin/spine, ARGS: -C '/etc/cacti/spine.conf' --poller=1 --first=0 --last=0 --mibs]
Waiting on 1 of 1 pollers.
PHP Fatal error: Maximum execution time of 299 seconds exceeded in /opt/cacti/lib/database.php on line 287
I don't have a clue what is it doing until timeout. Don't see information on log or console.
I'm running SLES15SP2 (main and 1 poller) and Debian 11 (another poller).