-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poller service starting multiple polling process for same machine #5619
Comments
@clinta any input on this? |
Can you provide a log from the poller service? |
I have the same issue using 32 service worker on a non distributed poller. |
I'm sure the info asked for above is still required :) |
Setting the service loglevel to debug. cat poller-service.txt | grep 141 |
Just a sample log, got multiple polls on machines like 93, 122, 136, 175, 224, 371, 1288 Not too bad when polling a performing machine, but I have some older ones that gets hammered and finish at over 300sec poll time |
@clinta some debug above if it's of help? |
@clinta Are you able to spare some time to look at this? |
@clinta any joy in taking a look at this? |
@boudreau are you using a single SQL instance or are you using some Clustered/MultiMaster setup? SQL Locks are not replicated in a cluster so that could cause a device being polled multiple times. just an idea. |
Got a single instance running. |
I started to look into this, but I don't know enough. It looked like the locking was not working anymore with a specific version of mysql/mariadb... |
Do you know which version of mariadb has a working lock system? |
I upgraded our mariadb on our second server to version 10.1.22 and I have much less duplicate polling started at the same time: grep poller librenms.log | uniq -d -c | sort First number is number of duplicate entries in the log On our new server: only 143 duplicated entries and only a max of 2 duplicated entries at a time. So I guest it much better with a more recent mariadb. Hope it give some insight |
Wish I could help here since I think the service based poller is superior, but you may have to use cron based polling for now. Basically, the locking is broken. So either repair the current locking scheme or replace with a different one. |
I believe this will fix the locking on mysql >= 5.7.5. As of that version, GET_LOCK will not return 0 if calling from the same connection. fixes: librenms#5619
Closing this, it's documented here for anyone experiencing the issue but no fix is forthcoming |
I'm using distribution pollers and starting using the poller service instead of crontab.
The poller service seem to be doing pretty good, but I have often multiple polleing process started with the same device ID to poll:
librenms 12553 59796 0 08:32 ? 00:00:00 /bin/sh -c /usr/bin/env php /var/www/librenms/poller.php -h 677 >> /dev/null 2>&1
librenms 13051 59796 0 08:32 ? 00:00:00 /bin/sh -c /usr/bin/env php /var/www/librenms/poller.php -h 677 >> /dev/null 2>&1
librenms 13263 59796 0 08:32 ? 00:00:00 /bin/sh -c /usr/bin/env php /var/www/librenms/poller.php -h 677 >> /dev/null 2>&1
This happens on the main poller/DB/web site as well as the other pollers.
It should not start multiple poller for the same device since there should be a DB lock on the device. Could there be a multiple queries before the lock is active in the DB?
How can I solve this?
Thanks for the help
DO NOT DELETE THIS INFORMATION.
GitHub issues is for feature requests or bugs, please do not post issues asking for help or how to do X, Y or Z.
You can use our irc channel ##librenms on freenode to ask questions or our community site.
Please confirm each of the sections below by putting an
x
in the box like[x]
.Please do not submit an issue if your install is not up to date within the last 24 hours or on a stable monthly release.
====================================
section of./validate.php
which you can run from the cli.The text was updated successfully, but these errors were encountered: