On 1/14/16, Werner Kleiner <sqlitetester at gmail.com> wrote: > Hello > I have written a small Wep application with PHP (PDO Apache,). This web app > uses a sqlite db3 database. Also there is a Windows application which uses > the same database file. > Now we heard one time that there war a problem and in a log file we saw the > error code > "Database is locked" > My question now is: > Could this be a problem when Apache or PHP uses same database and also a > windows application? > For example if PHP writes to table "users" and windows application reads > from "users" at same time?
Set WAL-mode to work around that. https://www.sqlite.org/wal.html Also set a busy timeout using "PRAGMA busy_timeout=10000;" or similar (https://www.sqlite.org/pragma.html#pragma_busy_timeout). -- D. Richard Hipp drh at sqlite.org