SQLite Forum

Disk I/O error on cifs volume
Login
Hi,
We have a sqlite database that is uploaded to a cifs volume and only accessed in read-only mode. The application (dotnet core) is running on a docker container on a Linux managed machine in Azure (Ubuntu 4.4.0). 

This was working fine, but recently when querying the sqlite database a disk I/O error occurs sporadically, even if the database is opened in read-only mode (and no concurrency).

Output from a very simply sqlite3 session with a tiny dummy database (a table with 3 rows):

<pre>
sqlite3 -readonly test.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> select * from orders;
Error: disk I/O error
sqlite> select * from orders;
O1|A|100
O2|B|200
O3|C|300
sqlite> select * from orders;
O1|A|100
O2|B|200
O3|C|300
sqlite> select * from orders;
Error: disk I/O error
sqlite> select * from orders;
O1|A|100
O2|B|200
O3|C|300
sqlite> select * from orders;
Error: disk I/O error
sqlite>
</pre>

I know the error above could occur if write operations were involved on a cifs volume, as sqlite uses 'byte-range locking' that's not entirely supported on that type of mounted file system, but was expecting that opening a database in read-only mode and querying a table would work without issues (as that was the until recently).

Any idea what could be causing the error or if there are any workarounds?
Thank you