On 14 Mar 2014, at 4:42pm, Sandu Buraga <sandu.bur...@gmail.com> wrote:
> For write operations the SQLite needs to lock the entire database file, > using WAL the granularity is improved and the locks are at table level. Is > it possible to get a better granularity, for example for a group of rows or > even more to row level? No. > I am asking this because I have scenario with one writer and 2 readers, and > I am getting 'database table is locked' errors. The write statements: > INSERT, INSERT OR UPDATE, DELETE are encapsulated in a transaction and I am > using WAL mode. Have you set a timeout ? <https://sqlite.org/c3ref/busy_timeout.html> By default SQLite does no retrying at all. This means that almost every setup with multi-thread or multi-process access is going to get error messages. Setting a timeout of a few seconds makes most apps run without problems. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users