I am doing a transaction in a MongoDb database and when inserting or deleting I get the following exception:
Command insert failed: Transaction has been aborted
. However I am not aborting the transaction deliberately. I tried reducing the commands sent to the database to a minimum but the exception still happens.
Turns out there was a time limit for transactions. I ran the following command in the mongo shell and the transaction could complete.
db.adminCommand( { setParameter: 1, transactionLifetimeLimitSeconds: 3000 } )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With