Wednesday 15 May 2013

mongodb - why is my mongo local db oplog gigantic -


Appreciate any insights on this, I have 2 questions:

1) My local DB oppling is growing on a large scale. 2) To free up the 18 GB of wasted space, remove my local. Apollo safely (or reset)

scenario: I'm running my mongod a snapshot of the production data locally:

  mongod --dbpath / temp / MongoDumps / mongodata-2013-06-05_1205- Sn W / data   

I saw that weird thing is that my local DB larger

  & gt; Show DBS local 18.0693359375GB prod- snapshot 7.9501953125GB   

Although there appears to be caused by the huge local database oplog Which (even if its a capped collection)

  db.oplog.rs.stats () { "ns": "Localkoplogkrs", "count": 25319382, "size": +10440151664, "avgObjSize": 412.33832895289464, "storageSize" : +1863448 9728, "Numestents" 9, "Nindekses": 0, "Lastestentsize": +1463074816, "Pddingfactor": 1, "Systemflags": 0, "Usserflags": 0, "Totlindekssize": 0, "Indekssizes" : {}, "Shadowed": True, "Maximum": Number Long ("9223372036854775807"), "OK": 1}   

and my location Even if I have not set any replica set on it, my local DB has inherited my production replica set configuration (maybe it is the successor through snapshot).

  rs .config () {"_id": "mongocluster1", "version": 38042, "member": ["," host ": 4," host ":" Mongol-01 D.mcluster-01: 27017 ", "Tag": {"app": "backend"}}, {"_id": 5, "host": "Mongol-01C.mcluster-01: 27017"}, {"_ id": 11, "host" : "mongoarbiter-01C.mcluster-01: 27017", "arbiterOnly": true}, { "_ id": 7, "host": "mongoremote-01Z .mcluster-01: 27017", "Pref Micta ": 0," hidden ": true}, {" _ id ": 21," host ":" mongodelayed-01D.mcluster-01: 27017 "," priority ": 0," SlaveDelay ": 3600," hidden ": True}]}   

Not sure whether related, but also see:

  & gt; Rsstatus () {"OK": 0, "errmsg": "not running with --replSet"}   

And when I start the server, I get a replicat warning:

  Mongo DB shell version: 2.4.1 Connecting: The test server has startup warnings: ** WARNING: The soft spaces are very low. Number of files is 256, should be at least 1000 ** WARNING: Starting without Mongol --replSet 1 document is present in the local. System.replset ** - Restart with replSet until you are not maintaining and no other client is connected. ** TTL archive monitor will not start because of this.  

You captured a snapshot of the data directory of the production node, and therefore you have its EXACT Database configuration

This includes a "local" database in the local database (among other things) replication set configuration and oplog.

Since you intend to run your mongod in single mode, then you just use local database dropdown () command without any ill effects. Do this will leave the database and the space will be retrieved by the OS.

No comments:

Post a Comment