Navigation
This version of the documentation is archived and no longer supported.

setParameter

setParameter

setParameter is an administrative command for modifying options normally set on the command line. You must issue the setParameter command against the admin database in the form:

{ setParameter: 1, <option>: <value> }

Replace the <option> with one of the following options supported by this command:

Options:
  • journalCommitInterval (integer) –

    Specify an integer between 1 and 500 signifying the number of milliseconds (ms) between journal commits.

    Consider the following example which sets the journalCommitInterval to 200 ms:

    use admin
    db.runCommand( { setParameter: 1, journalCommitInterval: 200 } )
    
  • logLevel (integer) –

    Specify an integer between 0 and 5 signifying the verbosity of the logging, where 5 is the most verbose.

    Consider the following example which sets the logLevel to 2:

    use admin
    db.runCommand( { setParameter: 1, logLevel: 2 } )
    

    See also

    verbose.

  • notablescan (boolean) –

    Specify whether queries must use indexes. If true, queries that perform a table scan instead of using an index will fail.

    Consider the following example which sets the notablescan to true:

    use admin
    db.runCommand( { setParameter: 1, notablescan: true } )
    

    See also

    notablescan.

  • traceExceptions (boolean) –

    New in version 2.1.

    Configures mongod log full stack traces on assertions or errors. If true, mongod will log full stack traces on assertions or errors.

    Consider the following example which sets the traceExceptions to true:

    use admin
    db.runCommand( { setParameter: 1, traceExceptions: true } )
    

    See also

    traceExceptions.

  • quiet (boolean) –

    Sets quiet logging mode. If true, mongod will go into a quiet logging mode which will not log the following events/activities:

    Consider the following example which sets the quiet to true:

    use admin
    db.runCommand( { setParameter: 1, quiet: true } )
    

    See also

    quiet.

  • syncdelay (integer) –

    Specify the interval in seconds between fsyncs (i.e., flushes of memory to disk). By default, mongod will flush memory to disk every 60 seconds. Do not change this value unless you see a background flush average greater than 60 seconds.

    Consider the following example which sets the syncdelay to 60 seconds:

    use admin
    db.runCommand( { setParameter: 1, syncdelay: 60 } )
    

    See also

    syncdelay.