How to Fix MongoDB Error 109 (ConfigurationInProgress)
You see mongodb error 109 when a cluster node is already updating its setup. To fix it, wait for the active change to finish before you send another command. MongoDB names this failure ConfigurationInProgress in its official error list. It protects the database from running two conflicting setup tasks at the same time. When teams rush cluster updates or run automated scripts in parallel, this code stops bad state changes. What causes mongodb error 109 in a cluster Database nodes share state
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You see mongodb error 109 when a cluster node is already updating its setup. To fix it, wait for the active change to finish before you send another command.
MongoDB names this failure ConfigurationInProgress in its official error list. It protects the database from running two conflicting setup tasks at the same time. When teams rush cluster updates or run automated scripts in parallel, this code stops bad state changes.
What causes mongodb error 109 in a cluster
Database nodes share state rules to know which machine holds primary data. When an admin or tool changes these rules, the cluster enters a transition state. If a second request arrives during this window, the engine returns code 109.
Several common actions trigger this lock in a live system. Two engineers might run deployment tasks on the same replica set at once. An automated scaling script might retry a slow request before the first one finishes. Network lag between nodes can also stretch out the time needed to apply new settings.
Client apps can also hit this error if they run admin commands on startup. If many app instances boot at the same time, they may race to set up the cluster. Only the first request runs, while the rest fail with code 109.
How to check the cluster state safely
Before you retry a failed change, check the current state of your nodes. You do not need broad write rights to inspect the database. MongoDB grants access through roles that apply to a specific database down to the collection level.
For basic checks, the built-in read role grants access to non-system collections. It lets an engineer list collections, list indexes, and view database or collection stats. Using a read role keeps your team from making accidental changes while they look for the root cause.
MongoDB Authentication & Authorization + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Look at the server logs to see which node started the active setup change. Check if a slow network link is holding up the heartbeat messages between members. Once all nodes report a stable state, the lock clears on its own.
How to fix and prevent overlapping setup changes
The fastest fix for code 109 is to pause all deploy scripts and wait. Give the database engine enough time to send the current change to every node. Once the cluster settles, you can run your update again if it is still needed.
To stop this error from coming back, change how your team runs admin tasks. Never let multiple scripts or people push cluster changes at the same time. Put a queue or lock in front of your deployment jobs so they run one by one.
You should also add backoff timers to any script that manages cluster settings. If a tool hits code 109, it should wait a few seconds before trying again. Finally, limit who holds admin roles so app servers only use read or readWrite roles for data work.
Inspect MongoDB wire traffic in flight
Built-in MongoDB roles govern collection access at setup time. They cannot score command risk per call or mask sensitive document values on the fly. By design, hoop.dev sits inline in the MongoDB protocol next to your server as a sidecar for your MongoDB. On every production command from mongosh, drivers, or AI agents, hoop.dev decides whether to pass, mask, block, or hold it for human review.
First, hoop.dev guardrails block bad deletes, drops, and write pipelines or hold them for approval. Next, hoop.dev data masking rewrites sensitive values in returned documents in memory and logs each decision. Explore the repo on GitHub.
Frequently asked questions
What does ConfigurationInProgress mean in MongoDB?
ConfigurationInProgress is the official name for error code 109 in MongoDB. It means the server rejected a setup change because another change is still running.
Does mongodb error 109 break normal read and write queries?
Normal app reads and writes usually keep working while a setup update finishes. Still, a stepdown during the update can briefly pause writes until a primary node takes over.
How do we stop automated scripts from hitting code 109?
Run cluster updates from a single job runner instead of every app server. Add wait and retry logic so scripts pause when a change is already active.
Related guides
In this post