How do I merge chunks?

Hi,

My EventStore is growing with around 262,135 KB every 4-6 days. But I don’t have that much data in it. Is it possible to merge/defragment these chunks? And how?

  • Morten.

Are you deleting data as well?

You need to scavenge the database, there’s a button in the web UI to kick it off. You might also want to turn down the statistics recording interval as this will reduce a lot of the noise.

a $maxage on statistics will also allow them to be deleted (if you want to set at say 10 minutes and arent interested in older ones)

It must be my unlucky day, but it does not work:

[02276,06,12:56:45.220] Request scavenging because /admin/scavenge request has been received.

[02276,14,12:56:45.313] SLOW BUS MSG [MainBus]: ScavengeDatabase - 91ms. Handler: StorageScavenger.

[02276,14,12:56:45.313] SLOW QUEUE MSG [MainQueue]: ScavengeDatabase - 105ms. Q: 0/3.

[02276,06,12:56:47.999] SCAVENGING: started scavenging of DB. Chunks count at start: 28. Options: alwaysKeepScavenged = False, mergeChunks = True

[02276,06,12:56:48.380] SCAVENGING: started to scavenge & merge chunks: #0-15 (chunk-000000.000002)Resulting temp chunk file: ec827019-d6e9-45ac-8b06-bfa5281d4f30.scavenge.tmp.

[02276,06,12:56:49.017] SCAVENGING: error while scavenging DB.

An item with the same key has already been added.