SQLite Forum

SQLITE_IOERR on `pragma journal_mode=wal;`
Login
I just enabled WAL in our application, and one of our beta users is getting this message via a sqlite bindings library*:

```
SQLite3 returned ErrorIO while attempting to perform prepare "PRAGMA journal_mode=WAL;": disk I/O error
```

"ErrorIO" corresponds to `SQLITE_IOERR`, "prepare" corresponds to `sqlite3_prepare_v2`, and I don't know where the message `disk I/O error` comes from; maybe the OS?  I would love more info.

I switched from `c_sqlite3_errcode` to `c_sqlite3_extended_errcode` to get more info, but it still seems to be returning plain old `SQLITE_ERROR`.  I also turned on `-DSQLITE_DEBUG` but it didn't seem to do anything for me.

I can't reproduce it on my mac, but his system is:
```
Ubuntu v20.04.2 LTS (Focal Fossa)
EXT4 filesystem, x86_64 architecture
```

Possibly related is the still unsolved https://sqlite.org/forum/forumpost/ab37b8ed32 which I _can_ reproduce on Mac.

I may end up ditching WAL, but I'd rather make it work, because certain operations have been faster with WAL journaling.

Thanks in advance for any ideas about how to figure it out.
-Arya

*direct-sqlite, if you're curious