Hi All,

Our web servers use a daily updated sqlite database file.

The file is opened by multiple (apache/PHP) threads but always in read only
mode:

$db = new SQLite3(DB_FILE, SQLITE3_OPEN_READONLY);

The file itself has no write access.

-rw-r--r-- 1 root root 225759232 Aug 24 13:43 db.sqlite

But sometimes we get PHP warnings:

PHP Notice: SQLite3Stmt::execute(): Unable to execute statement: database
is locked
SQLite3::prepare(): Unable to prepare statement: 5, database is locked
SQLite3::querySingle(): Unable to execute statement: database is locked

We can not understand how a read only file can get locked.

Any hint / fix ?

Regards,

Luc

Reply via email to