Android Lollipop 5.0.1 SQLiteLog POSIX Error 11 SQLite Error: 3850 Android Lollipop 5.0.1 SQLiteLog POSIX Error 11 SQLite Error: 3850 multithreading multithreading

Android Lollipop 5.0.1 SQLiteLog POSIX Error 11 SQLite Error: 3850


Writer locks the database for both reading and writing.That means it has to wait for all readers to finish and release locks in order to obtain lock.

After the writer requested a lock, new reader locks must wait for writer to first obtain lock and then release it.

This could be a solution for you: WAL mode

Activating And Configuring WAL Mode:

An SQLite database connection defaults to journal_mode=DELETE. To convert to WAL mode, use the following pragma:

PRAGMA journal_mode=WAL;

WAL will not block readers while writing, which means also that writer does not need to wait for current read locks to be released.

Minimum SQLite version required for WAL is 3.7.0 (2010-07-21).Lollipop 5.0 uses SQLite 3.8.4.3 so WAL should be available for you.

But WAL does not exist in Android version less than 3.0 although there are some exceptions from this. Take a look at Version of SQLite used in Android?. If you don't need your app to work below Android 3.0 you can use WAL.