Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Unable to start mongod server with default oplog size while trying replication

$
0
0

I was unable to create replication, i.e. rs.initiate() when oplog was having default value. My server had 400+ GB of space available. In MongoDB's official documentation default range for MMAP is 5% of free disk space between 990MB to 50GB but here under Memory Use :-

With MMAPv1, MongoDB automatically uses all free memory on the machine as its cache.

Error on console while doing rs.initiate() after starting mongod with no oplog size options:

mmap failed with out of memory

"errmsg" : "couldn't initiate : file /data/0/local.7 open/create failed in createPrivateMap (look in log for more information)"

So, I started mongod with --oplogSize 4096 only after which i was able to do rs.initiate. Now I know the issues with small oplog size, but i want to what exactly happened in background. 5% of free disk space or 50 GB upper bound, either way there was still good 300GB available in my server.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>