#MongoServerError

15 messages · Page 1 of 1 (latest)

undone anchor
#

Can anyone tell me why I'm getting this error

[16:30:39] ERROR (payload): MongoServerError: Caused by :: Write conflict during plan execution and yielding is disabled. :: Please retry your operation or multi-document transaction. at Connection.onMessage (B:\VSCode Projects\personal-projects\web-dev\official-nyla\node_modules\mongodb\src\cmap\connection.ts:449:20) at MessageStream.<anonymous> (B:\VSCode Projects\personal-projects\web-dev\official-nyla\node_modules\mongodb\src\cmap\connection.ts:241:56) at MessageStream.emit (node:events:514:28) at MessageStream.emit (node:domain:488:12) at processIncomingData (B:\VSCode Projects\personal-projects\web-dev\official-nyla\node_modules\mongodb\src\cmap\message_stream.ts:188:12) at MessageStream._write (B:\VSCode Projects\personal-projects\web-dev\official-nyla\node_modules\mongodb\src\cmap\message_stream.ts:69:5) at writeOrBuffer (node:internal/streams/writable:556:12) at _write (node:internal/streams/writable:490:10) at MessageStream.Writable.write (node:internal/streams/writable:494:10) at TLSSocket.ondata (node:internal/streams/readable:985:22) at TLSSocket.emit (node:events:514:28) at TLSSocket.emit (node:domain:488:12) at addChunk (node:internal/streams/readable:545:12) at readableAddChunkPushByteMode (node:internal/streams/readable:495:3) at TLSSocket.Readable.push (node:internal/streams/readable:375:5) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)

half krakenBOT
undone anchor
#

Why can’t anyone help with this?????

toxic fox
#

I am having the same error

twilit moth
#

@stoic vigil lots of mongo related issues have been occuring

stoic vigil
#

I need more info to be more helpful to these issues.
Last week I was putting in some more time into managing write conflicts. This error appears to be something different however.

#

I believe this error could be caused by having document changes or seed functions running on Payload start up. Consider that when Payload starts, the first time it sets up all the models and creates indexes. Currently those operations can create locks in the database, this is another known thing that can be worked around simply by waiting and retrying or running your seeds without transactions ie: db.transactionOptions: false.

#

I'll be able to put more time into these issues next week.

twilit moth
#

Thanks Dan, on the issue I posted, which is mongo but unrelated to this, I'm unable to access the mongosh because I can't get past the broken index

stoic vigil
#

In the meantime, please give more info to what steps are being taken or if this is while serving requests and also any configurations that might be helpful.

toxic fox
#

I am working on the Payload e-commerce template from GitHub (https://github.com/payloadcms/payload/tree/main/templates/ecommerce) and have deployed the website on "railway.app". After deploying the website, I upload images in the media collection and once I hit the "save" button, I can also see that file object on my MongoDB cloud. However, whenever I do some UI changes and re-deploy it, the images start breaking in the production website. (NOTE: the development Mongo cluster I am using is completely different than the one I am using in the deployment). I think in this whole process I seeing this error on my terminal

GitHub

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS. - payloadcms/payload

timid ridge
#

I don't understand how these errors dont come up in a google search

#

Surely mongodb is popular enough where these issues have happened before

undone anchor
#

I appreciate the replies