[SERVER-2562] monogod --oplogSize flag is ignored on Windows Created: 16/Feb/11  Updated: 12/Jul/16  Resolved: 22/Feb/11

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 1.6.5
Fix Version/s: 1.7.6

Type: Bug Priority: Critical - P2
Reporter: Ed Rooth Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 64-bit


Operating System: Windows
Participants:

 Description   

Tried starting up mongo with:

mongod --oplogSize 5000

However the oplog never grows beyond about 1GB.
Despite specifying the flag the log file writes:

Sun Feb 13 18:45:13 MongoDB starting : pid=824 port=27017 dbpath=d:\DB\Mongo\data 64-bit
Sun Feb 13 18:45:13 db version v1.6.5, pdfile version 4.5
Sun Feb 13 18:45:13 git version: 0eb017e9b2828155a67c5612183337b89e12e291
Sun Feb 13 18:45:13 sys info: windows (6, 1, 7600, 2, '') BOOST_LIB_VERSION=1_42
Sun Feb 13 18:45:13 [initandlisten] waiting for connections on port 27017
Sun Feb 13 18:45:13 [initandlisten] ******
Sun Feb 13 18:45:13 [initandlisten] creating replication oplog of size: 904MB... (use --oplogSize to change)
Sun Feb 13 18:45:13 [initandlisten] ******



 Comments   
Comment by Eliot Horowitz (Inactive) [ 22/Feb/11 ]

This has been fixed in 1.7.x.

Comment by Scott Hernandez (Inactive) [ 22/Feb/11 ]

I have been able to reproduce this, and others on the list have reported this for 1.6.5 as well; it is not reproducible in 1.7.5 (with rs.initiate()).

I get various error using different --oplogSize values:

Mon Feb 21 17:38:53 [initandlisten] cmdline oplogsize (1120) different than existing (1024) see: http://dochub.mongodb.org/core/increase-oplog
Mon Feb 21 17:38:53 [initandlisten] exception in initAndListen std::exception: cmdline oplogsize (1120) different than existing (1024) see: htt...
...exiting

Mon Feb 21 17:42:07 [initandlisten] creating replication oplog of size: 1024MB... (use --oplogSize to change)
...starts

Comment by Adrian Hills [ 21/Feb/11 ]

I've hit the same problem, with 1.6.5 on Windows 7 64 Bit.

Full args:
mongod --port 20000 --dbpath C:\mongodb\data\db\Test\ --replSet TestSet1 --oplogSize 5120

Log file shows:
Mon Feb 21 09:37:03 db version v1.6.5, pdfile version 4.5
Mon Feb 21 09:37:03 git version:
0eb017e9b2828155a67c5612183337b89e12e291
Mon Feb 21 09:37:03 sys info: windows (6, 1, 7600, 2, '')
BOOST_LIB_VERSION=1_42
Mon Feb 21 09:37:03 [initandlisten] waiting for connections on port 20000
Mon Feb 21 09:37:03 [initandlisten] ******
Mon Feb 21 09:37:03 [initandlisten] creating replication oplog of size: 1024MB... (use --oplogSize to change)
Mon Feb 21 09:37:04 [initandlisten] ******
Mon Feb 21 09:37:04 [websvr] web admin interface listening on port 21000
Mon Feb 21 09:37:04 [initandlisten] connection accepted from 127.0.0.1:54370 #1
Mon Feb 21 09:37:04 [startReplSets] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)

If i use --oplogSize 6144 mongod crashes and log file shows:
Mon Feb 21 09:42:08 Assertion failure cmdLine.oplogSize > 0 db \db.cpp 962

Comment by Ed Rooth [ 16/Feb/11 ]

Hi, we are using Windows 2008 Server.

This is the config file as we had it when starting up the server:

dbpath = d:\DB\Mongo\data
directoryperdb = true
bind_ip = 192.168.100.12
port = 27017
logpath = d:\DB\Mongo\logs\mongo.log
logappend = true
noauth = true
replSet = replSet
rest = true
oplogSize = 5000

Comment by Customer Support rpc-user [ 16/Feb/11 ]

Ed,

What other options are set in the config file or command line? Also, what flavor of Win7 are you using?

Generated at Thu Feb 08 03:00:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.