Database error: "sql: transaction has already been committed or rolled back"

The snapshot issue was likely introduced on that container a long time ago and perhaps was not restarted since lxd 5.2 (which added consistency checks).

Unless you know it was restarted after LXD 5.2 was applied? There’s a limited patch in lxd 5.3 to try and repair the missing records where possible, but its not possible in all cases. But the patch never deletes record.

See Lxc snapshot and lxc start Error: Instance snapshot record count doesn't match instance snapshot volume record count - #53 by tomp for more discussion.

So as to not confuse this thread please can you post any further details about that on the tread you linked to, thanks.