1

I have two application. One of those should write data to database, and another should read data. But "reader" throw exception "database locked".

What ways can be found out of this situation.

1 Answer 1

2

it seems that the database isolation level is set to the serializable, which is the highest one among four. since two applications can access the database simultaneously, the read-only one can read some uncommitted data while write-only one is updating data but not commit yet.

So, if you are sure you want to read data while another one is updating, you can change the isolation level of the database. hope it helps.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm sorry but I cannot find example which set isolation level :(
@christo based on your tag, I assume you are using sqlite, just set PRAGMA read_uncommitted = True; should slove your problem sqlite.org/sharedcache.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.