• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

How to fix MongoDB Error Code – 114 – InitialSyncOplogSourceMissing

January 2, 2024

How to Fix MongoDB Error Code – 114 – InitialSyncOplogSourceMissing

MongoDB is a popular open-source NoSQL database that offers high performance, scalability, and flexibility. However, like any software, it can encounter errors that need to be resolved. One such error is MongoDB Error Code – 114 – InitialSyncOplogSourceMissing. In this article, we will explore what this error means and how to fix it.

Understanding MongoDB Error Code – 114 – InitialSyncOplogSourceMissing

When performing an initial sync operation in MongoDB, the oplog is a crucial component that helps replicate changes from the primary to the secondary nodes. The oplog contains a record of all the write operations that have occurred on the primary node, allowing the secondary nodes to catch up and stay in sync.

Error Code – 114 – InitialSyncOplogSourceMissing occurs when the secondary node cannot find the oplog entries it needs to perform the initial sync. This error typically happens when the oplog size is smaller than the time it takes to complete the initial sync, or when the oplog entries have been removed or truncated.

Fixing MongoDB Error Code – 114 – InitialSyncOplogSourceMissing

To fix this error, you have a few options:

1. Increase Oplog Size

If the oplog size is smaller than the time it takes to complete the initial sync, you can increase the oplog size to ensure it can accommodate the sync process. To do this, follow these steps:

  1. Connect to the primary node using the MongoDB shell.
  2. Run the following command to check the current oplog size:
db.runCommand({ replSetGetConfig: 1 }).settings.oplogSize
  1. If the oplog size is smaller than the time it takes to complete the initial sync, modify the oplog size by running the following command:
db.adminCommand({ replSetResizeOplog: 1, size: <new_oplog_size_in_megabytes> })

Replace <new_oplog_size_in_megabytes> with the desired oplog size in megabytes.

2. Reconfigure Replica Set

If the oplog entries have been removed or truncated, you can reconfigure the replica set to start fresh. This method involves removing the existing replica set configuration and creating a new one. Here are the steps:

  1. Connect to the primary node using the MongoDB shell.
  2. Run the following command to remove the existing replica set configuration:
rs.remove()
  1. Reconfigure the replica set by running the following command:
rs.reconfig()

Follow the prompts to set up the new replica set configuration.

3. Restore Oplog Entries

If you have a backup of the oplog entries, you can restore them to resolve the error. Here are the steps:

  1. Stop all MongoDB processes.
  2. Restore the oplog entries from the backup.
  3. Start the MongoDB processes.

Make sure to follow the appropriate backup and restore procedures for your MongoDB deployment.

Summary

MongoDB Error Code – 114 – InitialSyncOplogSourceMissing occurs when the secondary node cannot find the oplog entries it needs to perform the initial sync. To fix this error, you can increase the oplog size, reconfigure the replica set, or restore oplog entries from a backup. If you encounter this error, it is important to take appropriate action to ensure the proper functioning of your MongoDB deployment.

For more information on MongoDB and VPS hosting solutions, visit Server.HK.

Recent Posts

  • CentOS Server Performance Tuning: Optimization Techniques for 2026
  • How to Configure SELinux in CentOS Without Breaking Your System (CentOS Stream 9/10 – 2026)
  • Managing Users and Permissions in CentOS Stream: Best Practices (CentOS Stream 9/10 – 2026)
  • How to Set Up Nginx on CentOS Stream for High-Performance Web Hosting
  • CentOS Stream Explained: Key Differences from CentOS Linux

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot