I am trying to add transactions in mongodb but it fails with the following error
"This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string"
I changed my connection string also to mongodb://localhost/?retryWrites=false then also the error comes.
Please suggest.
According to Monogodb documentation
Retryable writes require a replica set or sharded cluster, and do not support standalone instances.
With your question it looks like you are using standalone instance over localhost
. Create a replica set and you should be good.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.