One or more databases giving readonly errors

I performed a pihole -up yesterday, from the previous to the current version, and had the problem where everything froze due to swap I/O on this Pi 3B+. That lasted around 30 mins. After that I was seeing these errors repeating in FTL.log:

[2023-03-24 08:04:22.409 561/T627] Error while trying to close database: database is locked
[2023-03-24 08:07:01.172 561/T626] WARNING: Storing devices in network table failed: database is locked
[2023-03-24 08:08:01.226 561/T626] ERROR: SQL query "END TRANSACTION" failed: database is locked (SQLITE_BUSY)

After 12 hours I returned to the Pi and found the Query Log and graphs had no new entries since then. I rebooted and Pi-hole appeared to come back up and work again. Query Log and graphs now showing new entries and the repeating errors no longer appearing in FTL.log.

Pi-hole's DNS blocking is functioning correctly but I'm getting readonly database errors on all operations, such as trying to delete an adlist or add a domain.


I've tried another reboot and a /forcefsck reboot with no change, and the debug log isn't reporting any issues with the databases.

Rather than risk making it worse by guessing which databases to try and redo, I'm posting this in case there's a better approach.

This appears to have been fixed by temporarily switching branches to the gravity-test branch (suspect it's more a case of having a successful clean gravity run as a result of switching to that branch).

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.