Open binderth opened 7 years ago
I didn't want to re-open old issues and PRs, but there were already some old ones, I'm not sure, if they relate here, but I'll link them:
errReconnectThreshold
configuration, though)Just for the record: It seems this can happen also when mysql server hasn't been restarted. I'm sure I haven't restarted my mysql server (which is on the same server as openhab) for a very long time but I suddenly got those errors today. Solved it using a bundle restart.
Same here.
Expected Behavior
If for some reason the connection to the MySQL server is dropped (in my case after an update my Synology, which provides the MySQL/MariaDB instance), OH2 should reconnect to the MySQL server, if it's up again.
Current Behavior
If the connection is dropped, it's not reestablished, but there are only errors in the logfile:
this goes on, until the MySQL binding is restartet (
bundle restart xxx
in the OH2 console, e.g.)Possible Solution
OH2 should check, if the MySQL server is up again and reconnect to it automatically. This could be done e.g. with every time, there's an update to a persisted item or in a (configurable) interval. The first one would be the best, I think.
Steps to Reproduce (for bugs)
Context
I'd like to have a persistant persistance! ;) At present I'm either pressed to update my Synology manually (and reconnect MySQL after the update) or I have to look in the logs regularly (or install some log analyzer).
Your Environment