mattn / go-sqlite3

sqlite3 driver for go using database/sql

Home Page:http://mattn.github.io/go-sqlite3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error "database is locked" in wal mode

YanyunTao opened this issue · comments

In WAL mode, one transaction continues to write to the SQLite database, and another transaction will report the error "database is locked" when creating, updating, and inserting data. Is this a WAL mode configuration problem?

WAL doesn't allow concurrent writes. See section 2.2 concurrency, middle paragraph:

However, since there is only one WAL file, there can only be one writer at a time.