title: Why has my newly created mongodb local database grown to 24GB?
body: <p>I setup a mongodb replica set a few days ago, I did some little test on it and everything working well. Today I just found its local collection grew to 24G !!!</p>
  
  <pre><code>rs0:PRIMARY&gt; show dbs
  local   24.06640625GB
  test    0.203125GB
  </code></pre>
  
  <p>The other collections look normal except "oplog.rs":</p>
  
  <pre><code>rs0:PRIMARY&gt; db.oplog.rs.stats()
  {
      "ns" : "local.oplog.rs",
      "count" : 322156,
      "size" : 119881336,
      "avgObjSize" : 372.12200300475547,
      "storageSize" : 24681987920,
      "numExtents" : 12,
      "nindexes" : 0,
      "lastExtentSize" : 1071292416,
      "paddingFactor" : 1,
      "systemFlags" : 0,
      "userFlags" : 0,
      "totalIndexSize" : 0,
      "indexSizes" : {
  
      },
      "capped" : true,
      "max" : NumberLong("9223372036854775807"),
      "ok" : 1
  }
  </code></pre>
  
  <p>This is my mongodb.conf</p>
  
  <pre><code>dbpath=/data/db
  
  #where to log
  logpath=/var/log/mongodb/mongodb.log
  logappend=true
  port = 27017
  fork = true
  replSet = rs0
  </code></pre>
  
  <p>How can I solve it? Many thanks. </p>