Core Server
  1. Core Server
  2. SERVER-2562

monogod --oplogSize flag is ignored on Windows

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical - P2 Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 1.6.5
    • Fix Version/s: 1.7.6
    • Component/s: Admin
    • Labels:
      None
    • Environment:
      Windows 64-bit
    • Backport:
      No
    • Operating System:
      Windows
    • # Replies:
      5
    • Last comment by Customer:
      false

      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] ******

        Activity

        Hide
        Customer Support rpc-user
        added a comment -

        Ed,

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

        Show
        Customer Support rpc-user
        added a comment - Ed, What other options are set in the config file or command line? Also, what flavor of Win7 are you using?
        Hide
        Ed Rooth
        added a comment -

        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

        Show
        Ed Rooth
        added a comment - 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
        Hide
        Adrian Hills
        added a comment -

        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

        Show
        Adrian Hills
        added a comment - 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
        Hide
        Scott Hernandez
        added a comment -

        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

        Show
        Scott Hernandez
        added a comment - 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
        Hide
        Eliot Horowitz
        added a comment -

        This has been fixed in 1.7.x.

        Show
        Eliot Horowitz
        added a comment - This has been fixed in 1.7.x.

          People

          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 8 weeks, 3 days ago
              Date of 1st Reply: