Skip to content

database is locked error when use sqlite db #33199

Closed Answered by potiuk
bluzy asked this question in General
Discussion options

You must be logged in to vote

First of all sqlitedb should only be used for local unit testing and quick start (see the documetation where we clearly warn against using it for anything else)

Secondly - the _reserilalize_dag is only used in "upgradedb" that is closing session (via @provide_session decorator - and it's precisely as plannec to not close sessons.

One of the main reasons of "development" status is that Sqlite cannot work when you have two concurrent accesses to the sqlite file, this creates a lock - which is likely what you observed. you likley had another airflow process still running and accessing the database while you were running upgrade - this is likely why you saw the lock happen. Don't do it. Don't…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by bluzy
Comment options

You must be logged in to vote
3 replies
@DFINITYManu
Comment options

@potiuk
Comment options

potiuk Jul 7, 2025
Collaborator

@potiuk
Comment options

potiuk Jul 7, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug area:core needs-triage label for new issues that we didn't triage yet
3 participants
Converted from issue

This discussion was converted from issue #33187 on August 08, 2023 10:28.