How to Fix MongoDB Error 50915 (BackupCursorOpenConflictWithCheckpoint)
You see mongodb error 50915 when a backup cursor clashes with a storage checkpoint. You can fix this issue by retrying the backup request after the checkpoint finishes. Database teams rely on steady backups to keep data safe. Sometimes, internal engine tasks overlap with your backup job. When this happens, the database stops the backup request to protect data files. Knowing why this clash happens helps you build stronger backup jobs. What causes mongodb error 50915 in your cluster In the off
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 50915 when a backup cursor clashes with a storage checkpoint. You can fix this issue by retrying the backup request after the checkpoint finishes.
Database teams rely on steady backups to keep data safe. Sometimes, internal engine tasks overlap with your backup job. When this happens, the database stops the backup request to protect data files. Knowing why this clash happens helps you build stronger backup jobs.
What causes mongodb error 50915 in your cluster
In the official system list, mongodb error 50915 has the name BackupCursorOpenConflictWithCheckpoint. The database engine groups this fault under the RetriableError category. This means the failure is temporary and does not harm your stored data.
Your database writes changes to memory first and then flushes them to disk. A checkpoint is the exact step where the engine writes a clean state to storage. At the same time, a backup tool may ask to open a backup cursor. This cursor tracks which data files the backup tool needs to copy.
If the backup cursor tries to open right as a checkpoint runs, they clash. The storage engine cannot do both tasks at the exact same moment. Instead of risking bad data, the engine drops the cursor request. It then sends code 50915 back to the client or backup app.
Heavy write loads make this error show up more often. When your app writes lots of data, checkpoints take longer to finish. A longer checkpoint window raises the odds of a clash with a backup job. Multiple backup scripts running at once can also trigger this fault.
How to diagnose and fix the failure in production
Fixing this error does not require a server restart or disk repair. Since it belongs to the RetriableError group, the best fix is a simple retry. Wait a few seconds and ask the backup tool to open the cursor again. Most modern backup tools handle this retry step on their own.
MongoDB Authentication & Authorization + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
If you run custom backup scripts, add a short wait loop to your code. When the script sees code 50915, make it pause before trying again. You should also check your job schedule so backups run during quiet hours. Running backups when write traffic is low makes checkpoint clashes very rare.
When an engineer checks the cluster, keep access tight and safe. Do not hand out full admin rights just to inspect a failed backup log. MongoDB grants access through roles that allow specific actions on set resources. A role applies to its own database and can work down to one collection.
Note that Atlas users have different built-in roles than self-hosted cluster users. Still, both setups build roles from the same core set of privilege actions. For basic checks, the read role gives safe read access to non-system collections. It lets a user run find, listCollections, listIndexes, dbStats, collStats, and changeStream actions.
The read role leaves out insert, update, remove, and dropCollection actions. This keeps your data safe from accidental changes while someone checks the cluster state. You should only grant the readWrite role when a user must change data. That role adds insert, update, remove, createCollection, createIndex, dropIndex, and dropCollection actions.
How to prevent backup cursor conflicts
Good scheduling is the best way to avoid checkpoint clashes over time. Spread out your heavy batch writes so they do not run during backup windows. Make sure only one backup tool asks for a backup cursor at a time. Check your database logs often to see how long checkpoints take to complete.
Check MongoDB commands and documents on the wire
MongoDB roles and SCRAM login decide who opens a session. They do not check single commands or redact sensitive fields inside returned documents. With hoop.dev, you run an open-source proxy, a sidecar for your MongoDB, inline in the MongoDB wire protocol. On every command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
Before a command runs, hoop.dev guardrails check its effect and refuse banned drops or writes with MongoDB error code 13, or hold risky commands for approval. On the way back, hoop.dev data masking rewrites sensitive fields in returned documents in memory, and every verdict is logged. See the open-source code on GitHub.
Frequently asked questions
Is mongodb error 50915 a sign of data corruption?
No, this error does not mean your data is broken or lost. The engine blocks the backup cursor on purpose to keep the checkpoint clean.
Should I restart my database node to clear code 50915?
No, you should never restart the node for this specific error. It is a temporary RetriableError that clears up once the active checkpoint ends.
Which role lets an engineer check collection stats safely?
The built-in read role lets an engineer run collStats and dbStats on non-system collections. It blocks write actions like update, remove, or dropCollection to keep production data safe.
Related guides
In this post