title: why does CouchDBs _dbs.couch keep growing when purging/compacting DBs?
body: <p><strong>The setup:</strong></p>
  
  <ul>
  <li>A CouchDB 2.0 running in Docker on a Raspberry PI 3</li>
  <li>A node-application that uses <a href="https://www.npmjs.com/package/pouchdb" rel="nofollow noreferrer">pouchdb</a>, also in Docker on the same PI 3</li>
  </ul>
  
  <p><strong>The scenario:</strong></p>
  
  <ul>
  <li>At any given moment, the CouchDB has at max 4 Databases with a total of about 60 documents</li>
  <li>the node application <a href="http://docs.couchdb.org/en/2.0.0/api/database/misc.html#db-purge" rel="nofollow noreferrer">purges</a> (using <a href="https://pouchdb.com/guides/compact-and-destroy.html#destroying-a%E2%80%93database" rel="nofollow noreferrer">pouchdbs destroy</a>) and recreates these databases periodically (some of them every two seconds, others every 15 minutes)</li>
  <li>The databases are always recreated with the newest entries</li>
  <li>The reason for purging the databases, instead of deleting their documents is, that i'd otherwise have a huge amount of deleted documents, and my web-client can't handle syncing all these deleted documents</li>
  </ul>
  
  <p><strong>The problem:</strong></p>
  
  <p>The file <code>var/lib/couchdb/_dbs.couch</code> always keeps growing, it never shrinks. Last time i left it alone for three weeks, and it grew to 37 GB. Fauxten showed, that the CouchDB only contains these up to 60 Documents, but this file still keeps growing, until it fills all the space available</p>
  
  <p><strong>What i tried:</strong></p>
  
  <ul>
  <li>running everything on an x86 machine (osx)</li>
  <li>running couchdb without docker (because of <a href="https://stackoverflow.com/questions/36969395/docker-container-keeps-growing/36969502#36969502">this info</a>)</li>
  <li>using couchdb 2.1</li>
  <li>running compaction manually (which didn't do anything)</li>
  <li>googling for about 3 days now</li>
  </ul>
  
  <p>Whatever i do, i always get the same result: the <code>_dbs.couch</code> keeps growing. I also wasn't really able to find out, what that files purpose is. googling that specific filename only yields two pages of search-results, none of which are specific.</p>
  
  <p>The only thing i can currently do, is manually delete this file from time to time, and restart the docker-container, which does delete all my databases, but that is not a problem as the node-application recreates them soon after.</p>