SQLite Forum

What reading wal can result in `BusyError: database is locked`?
Login
Your problem is not precisely stated, so it is hard to know what is going
on.  Please know that in WAL mode, a connection should be able to read
the database at any time, regardless of what other connections are doing
with the database at the same moment.

There are some rare exceptions to the above.  For example, if the system
takes a power loss in the middle of a transaction, then the next time the
database file is opened, it must be recovered.  This recovery is completely
automatic.  However, while the first process to open the database is busy
running recovery, no other processes will be able to access the database
file.

There are other equally obscure exceptions.

Without knowing more about your situation, we cannot easily speculate on
why you are having difficulty.