Yes fault tolerant code would be definitely be the best solution, but until that happens a couple of extra lines in the SystemD service file is the simplest fix at this time.
You could add similar lines to the HA service file instead of a watch dog script, SystemD is coded very well to handle such situations. On Mon, 17 Nov 2025 at 12:26, Greg Troxel <[email protected]> wrote: > In Home Assistant, using pgsql, I have the HA start script just wait > until pgsql comes up. But that's my private script for my environment, > so that's ok. It might be that HA deals with this properly now. > > Overall, I would think the right answer is that weewx should try to > connect to the db, and if that doesn't work, just retry every minute. > While not connected, it wouldn't do anything. And, if the db connection > closes, it would go back to this waiting for db mode. > > Generally, I think programs that connect to other programs should have > this sort of logic so there is no need for synchronization. This is > really the only workable approach when services are on different > machines, and especially if the network to the server might have > issuees. > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/CAGTinV6U2k21wHATpfYYKXGeQsP-tKBTiFWukfEcR_TTzj_WPQ%40mail.gmail.com.
