You're trying to figure out why the database was locked? Beats me! That's a far more difficult problem.
It's been years since I've seen one of these errors. In the past, it was caused by a too-short retry wait, but sqlite fixed that a long time ago. On Mon, Aug 3, 2026 at 9:39 AM Vince Skahan <[email protected]> wrote: > Thanks, that helps but I was looking more toward figuring out where the > issue was that caused the engine to abort before the retry magic tried to > restart things. > > In the log snippet why did it silently exit the main loop 5 seconds after > adding records to the db ? Or it just a minor timing thing in how the logs > got written out ? > > vt-1 | 2026-08-01 08:40:17,595 weewxd[10] INFO weewx.manager: Added > record 2026-08-01 08:40:00 EDT (1785588000) to database 'weewx.sdb' > vt-1 | 2026-08-01 08:40:17,616 weewxd[10] INFO weewx.manager: Added > record 2026-08-01 08:40:00 EDT (1785588000) to daily summary in 'weewx.sdb' > vt-1 | 2026-08-01 08:40:22,644 weewxd[10] INFO weewx.engine: Main loop > exiting. Shutting engine down. > vt-1 | 2026-08-01 08:40:22,644 weewxd[10] INFO weewx.engine: Shutting > down StdReport thread > vt-1 | 2026-08-01 08:40:42,644 weewxd[10] ERROR weewx.engine: Unable to > shut down StdReport thread > vt-1 | 2026-08-01 08:40:43,174 weewxd[10] CRITICAL weewxd: Database > OperationalError exception: database is locked > vt-1 | 2026-08-01 08:40:43,175 weewxd[10] CRITICAL weewxd: **** > Waiting 2 minutes then retrying... > > > On Monday, August 3, 2026 at 4:27:09 AM UTC-7 Tom Keffer wrote: > > Look in weewxd.py, not engine.py. > > The function run() in engine.py is not involved in error recovery. > Instead, any uncaught exceptions filter up into main(), where there is a > big try/except block with different strategies for different exceptions. If > all else fails the exception is logged and the program exits (line 199 of > weewxd.py). > > -- > 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/25409997-6a59-4d15-adc8-6da4e7954d4cn%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/25409997-6a59-4d15-adc8-6da4e7954d4cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEBy92cG-8Le19HBnvc%3DpywTLZczNLW3YTE%2Bk0708pa7KQ%40mail.gmail.com.
