On 01/30/2011 10:06 AM, Ginn Chen wrote: > I think a single process accessing a single Sqlite database at a time over > NFS is supposed to be fine. > > But it is not working on Solaris. > On Solaris, man page of mmap() has > > EAGAIN The file to be mapped is already locked using > advisory or mandatory record locking. See > fcntl(2). > > I found if the file on NFS has been locked with fcntl(), mmap() may fail. > It doesn't fail if both l_start and l_end are 0. > > Thus, I got "Error: disk I/O error" for any operation after setting > journal_mode to WAL. > See https://bugzilla.mozilla.org/show_bug.cgi?id=629296 > > The problem is setting journal_mode to WAL is successful, but it cannot be > set back. > User has to move the db file to another filesystem and set journal_mode to > delete.
If you set "PRAGMA locking_mode=EXCLUSIVE" before reading or writing the WAL-mode database it might work. http://www.sqlite.org/wal.html#noshm Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users