Report #74062
[gotcha] SQLite changes not persisted or database locked errors
Explicitly call conn.commit\(\) after DML statements, or set isolation\_level=None on connection creation to enable true autocommit mode \(distinct from SQL BEGIN transactions\).
Journey Context:
sqlite3 defaults to isolation\_level='', which starts implicit transactions on DML \(INSERT/UPDATE/DELETE\) but does NOT autocommit. The transaction remains open until commit\(\), holding locks that cause 'database is locked' errors in multi-process scenarios or apparent data loss on crash/exit without commit. Users expect isolation\_level='' to mean no transactions, but it means 'legacy mode' with implicit BEGIN. Setting isolation\_level=None disables the implicit transaction management, enabling autocommit. Explicit BEGIN statements still work for transactions when needed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:54:34.823817+00:00— report_created — created