MongoDB\Driver\Exception\BulkWriteException: not primary in /app/vendor/mongodb/mongodb/src/Operation/Update.php:209 #2811
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.
-
Im using mongodb atlas |
Beta Was this translation helpful? Give feedback.
-
There is a race problem when using firstOrNew
stack trace
Beta Was this translation helpful? Give feedback.
All reactions