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

Auto database maintenance does not run #98

Closed
chris-y opened this issue Nov 28, 2018 · 1 comment
Closed

Auto database maintenance does not run #98

chris-y opened this issue Nov 28, 2018 · 1 comment

Comments

@chris-y
Copy link
Contributor

chris-y commented Nov 28, 2018

This is an old issue, see https://forums.cacti.net/viewtopic.php?f=15&t=12537

Database maintenance does not appear to run on a schedule as it is supposed to. The fix given in that thread works but has an issue (also theoretically present in the existing code) that adding 24 hours to the last maintenance time does not guarantee that it will run at the set time set and is liable to drift.

The existing code fails because it checks against the current time and when now<db_maint_time the clock gets set one hour ahead so the second check of now<db_maint_time never runs.

This probably needs re-writing so it always runs at db_maint_time and then advances the next_db_maint_time to the following day after it has run.

@netniV
Copy link
Member

netniV commented Nov 28, 2018

This has now been committed to the development code.

@netniV netniV closed this as completed Nov 28, 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