openhab-addons: [rrd4j] Persistence stops working after some time

This appears to be a regression in the latest Milestone.

After some time (it seems like it is every full hour) charts aren’t loading anymore. When I restart openHAB there’s a flat line that begins for example at 15:00 in the charts, so I believe no data was written since then, even though the values changed later aswell (I can see that in the event log). That indicates, that the RRD4J persistance service I am using apparently completely stopped working, it can’t be queried anymore and doesn’t write data anymore.

My persistence config looks like this:

Strategies {
	// for rrd charts, we need a cron strategy
	everyTenSeconds : "0/10 * * * * ?"
	everyMinute : "0 * * * * ?"
	everyHour   : "0 0 * * * ?"
	everyDay    : "0 0 0 * * ?"
}
Items {
	PersistenceLog*		: strategy = everyTenSeconds, everyMinute, everyHour, everyDay, restoreOnStartup
	RRDPersistence*		: strategy = everyTenSeconds, everyMinute, everyHour, everyDay, restoreOnStartup
}

Could it be that everyMinute and everyHour try to update at the same time, causing this issue? It was working fine on Milestone 3, so I believe this should be adressed before the release.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

That’s not the same issue I was having. I caused the issue by modifying the persistence strategy in an attempt to prevent double (or triple) persisting every hour and I think the rrd4j file format is based on that, so it was complaining about the structure no longer being correct.

The “real” issue I was having was, that rrd4j files were opened again and again leaking file descriptors in certain cases until openHAB eventually ran out of available file descriptors/hit the limit allowed. That appears to be resolved now, so this can be closed.