On Tue, Nov 12, 2013 at 8:12 AM, Richard Hipp <d...@sqlite.org> wrote:
> > > > On Mon, Nov 11, 2013 at 12:33 PM, Sandu Buraga <sandu.bur...@gmail.com>wrote: > >> Hi, >> >> I took your advice and now I am setting only once the journal_mode=WAL, >> also locking_mode=EXCLUSIVE and temp_store=MEMORY. But still it doesn't >> work, and I get DB locks immediately. I enabled SQLite traces, and I also >> added some supplementary traces when the WAL is set. Even if the >> journal_mode=WAL pragma seems to be successful, I don't think that the WAL >> works because I see no wal file on the disk, also I should have some WAL >> related traces, which are not present. >> > > There can only be a single connection open on the database file when you > change it to WAL mode. Did you try to change to WAL mode while holding > multiple connections open? > > The above is not quite correct. There can be multiple connections open, but none of the other connections can have any kind of lock. Are you sure that you don't have another thread trying to read the database file when you enter WAL mode? The easiest way to ensure this is to put the database in WAL mode when the first thread connects, and before any other threads have even opened. > > -- > D. Richard Hipp > d...@sqlite.org > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users