-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoServerError: WriteConflict error on MongoDB Atlas #4583
Comments
Note: I get this issue most frequently when I am doing a lot of writes at the same time. |
I had the same problem doing an update in the afterLogin hook. Not running Atlas, but a self-hosted replica set. After disabling transactions in payload.config.ts with |
@PrimarchAlpharius Can you confirm that the latest update to the db-mongodb adapter fixes your issue if you reenable transactions? |
@DanRibbens Confirming it works, thanks! |
@tyteen4a03 Are you still running into this on the latest version of Payload and db-mongodb? If you are using hooks that use the Payload local API, make sure you pass the I hope this helps! I'm closing this issue, but I will re-open if somebody can provide steps for reproduction and tag me so I see it. |
Mark suggested disabling transactions in discord. Could be related to #4350. |
Link to reproduction
No response
Describe the Bug
When using MongoDB Atlas, sometimes writes fail with "WriteConflict" error.
To Reproduce
See: https://discord.com/channels/967097582721572934/1182227009603117116/1182227009603117116
Payload Version
2.5.0
Adapters and Plugins
No response
The text was updated successfully, but these errors were encountered: