hook.io icon indicating copy to clipboard operation
hook.io copied to clipboard

Automatic compaction of couchdb database

Open Marak opened this issue 10 years ago • 3 comments

The couchdb database size can get a bit out of control with the update sequence count.

I've seen the size of the database balloon to 30+ gigs. This causes the disk to fill, and everything to go bad.

We don't really need the historical data for all document updates. For now, I think the best solution would be to automatically compact the couchdb after it hits a certain size...or change the settings of the couch so that the database doesn't grow too large. I'm not sure if couch has a built-in setting for this, more research is required.

see: #33 #32

Marak avatar May 27 '15 12:05 Marak

Couch now supports automatic compaction.

Documentation can be found here: https://wiki.apache.org/couchdb/Compaction#Automatic_Compaction

Will require a reconfiguration of the couch.

If anyone wants to open a PR with the new couch config, please do.

Marak avatar May 30 '15 11:05 Marak

Seems to be way better now that we are using redis for caching / metrics. Much less stress on the couchdb.

Haven't seen the size balloon up since the switch.

Low priority.

Marak avatar Aug 02 '15 06:08 Marak

Came up again last night. Seems we'll have to run a compaction every month or so.

Not a huge deal, but it does need to get done.

Marak avatar Oct 29 '15 14:10 Marak