Getting [SQLITE_BUSY] database file is locked with select statements

前端 未结 8 2034
广开言路
广开言路 2020-11-28 13:18

If I run multiple threads against my web app I get:

java.sql.SQLException: [SQLITE_BUSY]  The database file is locked (database is locked)
    at org.sqlite.         


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 14:01

    After some googling I found that it is a bad practice to use multiple connections when connecting to SQLite. See

    http://touchlabblog.tumblr.com/post/24474398246/android-sqlite-locking

    Set your poolsize maxactive to 1 and try out.

提交回复
热议问题