Skip to content
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

DBCALL ERROR: A DB Exec Failed!, Error:1062, SQL:'INSERT INTO plugin_thold_daemon_processes (poller_id, pid) VALUES(?, ?)' #212

Closed
ikorzha opened this issue Sep 24, 2018 · 3 comments

Comments

@ikorzha
Copy link
Contributor

ikorzha commented Sep 24, 2018

Hi I am not sure if this is a bug or DB performance tuning issue.
I have a large install base of 38,000 tholds, with Cacti polling time every minute.
Occasionally on my Cacti Log (once every 20-30min) I see the following error msgs:
I am looking at Cacti team guidance, is this a bug or something else.
About Environment:
Cacti 1.1.38
Latest Thold.
5 Cacti Pollers.

I also from time to time have erratic "Master poller" behavior (like poller over run, than shows 2 system stats within 1minute, 1 with high poller time...

image

2018/09/24 08:28:08 - CMDPHP SQL Backtrace: (/poller.php: 545 process_poller_output)(/lib/poller.php: 521 process_poller_output)(/lib/poller.php: 521 process_poller_output)(/lib/poller.php: 510 api_plugin_hook_function)(/lib/plugins.php: 113 api_plugin_run_plugin_hook_function)(/lib/plugins.php: 214 thold_poller_output)(/plugins/thold/includes/polling.php: 316 db_execute_prepared)(/lib/database.php: 209 cacti_debug_backtrace)

2018/09/24 08:28:08 - CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate entry '1-1537792088.4353' for key 'PRIMARY'
2018/09/24 08:28:08 - DBCALL ERROR: A DB Exec Failed!, Error:1062, SQL:'INSERT INTO plugin_thold_daemon_processes (poller_id, pid) VALUES(?, ?)'

image

@netniV
Copy link
Member

netniV commented Sep 24, 2018

This sounds like you've ended up with two pollers running at the same time. However, the strange thing is that it's using the same PID which more looks like a unix time stamp but with microseconds...

@ikorzha
Copy link
Contributor Author

ikorzha commented Sep 24, 2018

I honestly believe that in this case thold is a victim. If I disable weathermap plugin and run without for 30min, I do not get a single poller overrun....
And my maps all run within 25sec, so they are definately not over running the poll cycle.
One thing I am still running weathermap 1.0.0dev 1 year old edition, that was Howie preliminary version for Cacti 1.x before he started to undertake a major re-design.
I am not sure if his current Git development is usable to test what is your opinion?

Look at this screen shot:
What a difference with weathermap enable vs disable:

image

I am going to close the issue after your comments.

@netniV
Copy link
Member

netniV commented Sep 24, 2018

I would post this to Howie's repo. I've worked with him for some time and I'm sure he'll have an opinion on this. As for as his current dev state, things work from a runtime point of view. The editor also works. But adding new maps, defining groups, etc. that is all work that needs to be done.

@ikorzha ikorzha closed this as completed Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants