couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <>
Subject Re: Compaction without Diskspace
Date Thu, 08 Jul 2010 21:41:13 GMT

On Jul 8, 2010, at 2:36 PM, Michael wrote:

> Hello everyone;
> I am new to this list and to Couch.
> For my first real test with Couch I created a database which was updated via
> another service every 5 minutes. I guess i didn't realize how much data I
> was taking in, because I got distracted and came back to the server and the
> couch database had grown large enough to fill all the disk space.

one way to recover here is to use replication to clone your database to another host, then
delete the original database and replicate back.

if you are updating documents a lot (and not just adding new docs) replication alone will
result in a much smaller file.

if you aren't updating (just logging new docs) then you'll still end up with a smaller file,
but maybe not quite as small.

> Clearly, I can delete the database manually, recover my disk space and fix
> everything, but I am learning, so bear with me.
> I seem to have found bug 808 [1] while trying to compact the database. This
> makes Couchdb unresponsive. Is there an easy way to manually compact the
> database, perhaps specifying a mount which has more disk space?
> [1]
> So the next question is, how do I keep this under control? I think to keep
> myself sane I will probably write a script that checks the size of the
> database and if it exceeds a certain size the script will compact the
> database. Is there an automatic way to do this? Anyone have any best
> practices? When the wiki says "near full capacity for its write load" how do
> I measure what full capacity is?

if you are importing every few minutes, you are not anywhere near full write-throughput capacity,
so compact whenever you feel like it.

in the future we'd like to add some form of auto compaction, but it's not around yet.

Have fun!

> Thanks for the help. I am really enjoying Couch, it feels right,
> Michael

View raw message