MongoDB\Driver\Exception\BulkWriteException: not primary in /app/vendor/mongodb/mongodb/src/Operation/Update.php:209 #2811
Unanswered
masterbater
asked this question in
General
Replies: 2 comments
-
Looking at the stack trace, I don't see where you are using firstOrNew. This error suggests that the command is unable to run on a secondary node because it requires a primary node. If you use a replica set without load-balancer, you must list all the server hosts in the connection URI. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Im using mongodb atlas |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a race problem when using firstOrNew
stack trace
Beta Was this translation helpful? Give feedback.
All reactions