"Failed to connect: The database file is locked database is locked" during "Deleting unwanted files …" never terminates

Although it was a milder too-many-blocks situation, I think we’ve fought fileset deletion code before.

Reducing Time Spent Deleting Blocks whose parent topic also had us increasing the SQLite cache.

The current investigation has done less at the SQL level, but some testing there would seem useful.
There was a suggestion for manual test for part of the slow query, but profiling log may also show it.

presumably finished eventually, but we don’t know how long, or which parts of that were slow spots.