Rollback Time Limit in Mongo Community Server

Hi there
We currently have the bitnami/mongodb docker image running using the community edition of Mongo Server (V 4.2).
Due to a downtime over the weekend our secondary DB cannot start due to:
Rollback failed with unrecoverable error: UnrecoverableRollbackError: not willing to roll back more than 86400 seconds of data. Have: 132368 seconds.
We tried setting the --rollbackTimeLimitSecs=2147483647 option but that doesn’t work:
Error parsing command line: unrecognised option '--rollbackTimeLimitSec=2147483647

I assume that’s due to us using the community server. Is there any workaround to that?
Thanks in advance!
Cheers,
Robin

Welcome to the MongoDB Community Forums @Robin_Hermanek !

The rollbackTimeLimitSecs option is supported in MongoDB 4.0+. The error message suggests you have a typo in the option name (missing the s).

However, I would also note that 132368 seconds is almost 37 hours of data that will be rolled back. Before doing so, I would make sure you understand the downtime incident you had over the weekend and why this secondary appears to have diverged by 37 hours of writes.

Regards,
Stennie

Hi Stennie

Thanks for your reply. Sadly this is just a typo in my question, I wrote it with the s on the mongodb instance and got the error that it was not recognized. As far as i can see, the community Version does not support it or does it?
And yes I understand that it will take quite some time for the writes.

Thanks and cheers,
Robin

Hi @Robin_Hermanek,

I just realised rollbackTimeLimitSecs is a MongoDB Server Parameter. not a distinct command-line option.

You need to set this value using setParameter which can be done:

  • At runtime:

    db.adminCommand( { setParameter: 1, rollbackTimeLimitSecs:86400 } )

  • Via the --setParameter command-line option:

    mongod --setParameter rollbackTimeLimitSecs=86400 ...

  • Via the setParameter setting in a mongod configuration file:
    setParameter:
        rollbackTimeLimitSecs: 86400

You can use the getParameter command to check the current value:

  db.adminCommand({ getParameter: 1, rollbackTimeLimitSecs:1})

Regards,
Stennie