Firstly, show us the exact log messages when the recorder starts to fail.
Secondly, and obviously, if it’s actually a network issue, you should fix that.
I doubt that Recorder is “unavailable” to HA, Recorder is 1 of the first thing HA “sets up”, Configurations such as db_url , etc comes from conf…yaml … so what becomes “unavailable” is most likely your “MariaDB” , Not the Recorder Service on HA … a proper Network-Setup is AO for an External DB to not get “lost connections” and of cause that HA is “capable” of keeping the connection, to external “re-sources”, as i.e a DB, DNS, Router, Zigbee-wifi-hub, Cast-Device etc
I.E Could be of interest to see you Recorder “Settings” and DB Settings in Conf…yaml … if you have “Very Limited” Records, you might want to either increase db_max_retries( if for some reason your “connection”(somewhere) has gone into “sleep_mode” ( i strongly assume you don’t have your MariaDB on a “default” windows_machine ) , … or “create” a “Dummy” to “store” (more often) … But these “suggestions” seems more like “Workarounds”
PS: i do believe i.e Tracker helps HA keeping “contact” with it’s “environment”
The first thing I would try is remove the last three lines that limit the recorder. Then I would check if you, especially with mariaDB, set up a max. amount of connections on your Database side. for example if you use DBeaver as a way to access your database you can set these limits for the user you set up for your database.
so why did you add these lines, if you dont know what they do ? … have you even looked in your DB-logs ? … i mean you have timestamp in HA, when the errors occurs … try to compare them with what the DB logs say
I had a similar concern but I notice that if the database server goes offline the recorder resumes logging when it comes back online. This is the point of the retry?
I discovered that my HAS had come back online with only IPv6 and the database server isn’t using IPv6. I don’t know why the IPv4 was disabled so that remains a mystery.
Is there already an solution for this?
After an power outage, both my synology and HA where down. After it powered back up, the recorder could not connect. I found out that it is because of the synology taking way longer to start up, and is not online yet when HA tries to connect. Once HA fails to connect, it does not try to reconnect at all. So i have to reboot HA once more, and it runs fine.
anyone knows an solution to force ha to reconnect automatically?