Cannot continue txnId -1 for session in MongoDB shard

Viewed 36

Occasionally I'm facing with this error: 251 (NoSuchTransaction): 'cannot continue txnId -1 for session. And it aborts a transaction.

My enviroment:

MongoDB 4.4 bitnami shard (https://github.com/bitnami/bitnami-docker-mongodb-sharded) Scala MongoDB driver 4.4 (https://github.com/mongodb/mongo-java-driver/tree/master/driver-scala)

Here (https://docs.mongodb.com/manual/core/transactions-sharded-clusters/) they stated "On sharded clusters with multiple mongos instances, performing transactions with drivers updated for MongoDB 4.0 (instead of MongoDB 4.2) will fail and can result in errors, including"

Both my MongoDB and driver are 4.4. What else could be problem?

0 Answers
Related