Jump to content

Problems during prune command, or how to repair vcdbs file?


Recommended Posts

Posted

World on our server size is above 40 GB, thus we decided to try prune command.

We tried it on backup copy and server crashed:

25.11.2025 23:43:18 [Fatal] Caught unhandled exception in thread 'chunkdbthread'. Shutting down server.
25.11.2025 23:43:18 [Error] Exception: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Vintagestory.Common.Database.SQLiteDbConnectionv2.DeleteChunk(UInt64 position, String tablename) in VintagestoryLib\Common\FileIO\Database\SQLiteDbConnectionv2.cs:line 258
   at Vintagestory.Common.Database.SQLiteDbConnectionv2.DeleteChunks(IEnumerable`1 chunkpositions, String tablename) in VintagestoryLib\Common\FileIO\Database\SQLiteDbConnectionv2.cs:line 250
   at Vintagestory.Server.ServerSystemSupplyChunks.deleteChunkColumns() in VintagestoryLib\Server\Systems\World\LoadThread\SupplyChunks.cs:line 525
   at Vintagestory.Server.ServerSystemSupplyChunks.OnSeparateThreadTick() in VintagestoryLib\Server\Systems\World\LoadThread\SupplyChunks.cs:line 448
   at Vintagestory.Server.ServerThread.Process() in VintagestoryLib\Server\ServerThread.cs:line 92
25.11.2025 23:56:37 [Notification] Prune complete, 1088504 chunk columns were removed, 16062 chunk columns were kept.
25.11.2025 23:56:37 [Notification] Server stop requested, begin shutdown sequence. Stop reason: Exception during Process
25.11.2025 23:56:37 [Event] Something went awry...please check the program logs... (Exception during Process)
25.11.2025 23:56:37 [Notification] Server ticking has been suspended
25.11.2025 23:56:37 [Notification] Entering runphase Shutdown

I'm afraid, that map is somewhat corrupted and beside of non-functional prune command, it may cause some other problems in future.

Are there any tools to check integrity/repair vcdbs file?

  • Sad 1
Posted (edited)

I'm glad you tried that on a backup copy. Always have a backup copy before these commands.

The standard "Repair" is accessed (on single player) from the pencil Edit icon against the game save name.
I don't know if I'd hold out much hope for that doing much in this case.

I'm not aware of other utilities in this space, except for the SQLLite chunk repair tool here:
https://wiki.vintagestory.at/index.php/Repairing_a_corrupt_savegame_or_worldmap

I recommend:
* Check the above repair tool. 
Then, if no go:
* Take this to the Issue Tracker with the full set of logs, not just the snip.

This should be in the logs, but anything you can include up-front in the ticket will initially help:

Also include:

* Version that the save was originally created on

* Version it is on now.

* The o/s name and version.

* The exact dbprune command syntax used.

* Full log set.

Also note that you would typically run a db vacuum command after a dbprune command. I'm not sure if your Save is in a fit state to make this useful at this point, but it may reduce the file size while not harming anything "more".

Thanks, Professor Dragon.

 

Edited by Professor Dragon
Posted

I know about command db vacuum, but I had no chance to run it, because server crashed.

Unfinished prune is one thing, but such error may cause also other problems.

How to produce more verbose logs?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.