Integrity check sees errors in pieceinfo.db

Been troubleshooting severe node slowness which has eventually led to suspensions on all nodes. Vacuumed all databases tonight successfully. When I performed the integrity check ("PRAGMA integrity_check;), I’m seeing errors in pieceinfo.db

*** in database main ***
Main freelist: freelist leaf count too big on page 29413
Main freelist: invalid page number 167772160
On tree page 28569 cell 376: 2nd reference to page 28791
~
Page 32945 is never used
~

Help please!

More digging in logs… I find
ERROR collector error during collecting pieces: {“error”: “database disk image is malformed”}

Does this refer back to the pieceinfo.db errors indicated above?

I’m in the process of applying this procedure. Will report back results in the morning. Any help or insight would be appreciated!

I completed the procedure last night. The resulting pieceinfo.db reduced in size to 65MB from 259MB which seems like a drastic reduction.

I’ve not had the courage yet to do this on a production database. Any insights on the results of this? The impact to my node if significant data is lost in the DB?

Overnight, I emerged from suspension on all sats except one. So I’m headed in the right direction.

The fix is doing unload a readable data from the database and load it back. It is like a vacuuming, but you can lose some data too. This is not fatal for your storagenode, but some stat could be lost or corrupted. It should not affect customers data or your earnings though.