SQLITE_BUSY The database file is locked (database is locked) in wicket

Sqlite allows only one writer to the whole database at a time and, unless you selected “WAL” journal mode, no reader while writing. Moreover unless you explicitly ask it to wait, it simply returns the SQLITE_BUSY status for any attempt to access the database while conflicting operation is running.

You can tell sqlite to wait for the database to become available for a specified amount of time. The C-level API is sqlite3_busy_timeout; I never used sqlite from Java though, so I don’t know where to find it there.

Leave a Comment