What Can I Do When OOM Occurs During the Migration of MongoDB Databases?
Scenarios
Out of memory (OOM) occurs during the migration of MongoDB databases, causing migration failures.
Possible Cause
The possible causes are as follows:
- If the mongod service of the source database is deployed on a single server, OOM occurs when the migration process consumes large amounts of memory through operations such as creating indexes and sorting queries.
- If the mongod service is deployed on a server with other services and the cacheSizeGB value is not specified, OOM occurs when all available memory has been allocated to other services, so the WiredTiger engine does not have sufficient memory.
By default, the memory used by the WiredTiger engine of mongod is calculated as follows: (Memory in GB-1) x 50% for version 3.2 or (Memory in GB-1) x 50% for version 3.4 and later.
Solution
- If the mongod service is deployed on a single server, do not perform any operations that consume large amounts of memory during the migration.
- If the mongod service and other services are deployed on the same server, set the value of cacheSizeGB to the half of the minimal idle memory to ensure that memory used in peak hours will not be allocated to WiredTiger excessively.
Real-Time Migration FAQs
- When Can I Stop a Migration Task?
- How Do I Maintain the Original Service User Permission System After Definer Is Forcibly Converted During MySQL Migration?
- What Can I Do If the Invoking Permission Problem Occurs After the MySQL Stored Procedure Is Migrated to the Cloud?
- How Do I Ensure that All Services on the Database Are Stopped?
- What Can I Do When Message "can not get agency token" Is Displayed in the Migration Log
- What Do I Do If the Maximum Index Length Has Been Reached During Migration from Oracle to MySQL?
- Why Is the Collation of Heterogeneous or Oracle Databases Converted to utf8mb4_bin After Those Databases Are Migrated to MySQL?
- What Can I Do If MyISAM Tables Are Not Supported by RDS for MySQL?
- What Are the Precautions for Migrating Data from an Earlier Version MySQL to MySQL 8.0?
- What Can I Do When OOM Occurs During the Migration of MongoDB Databases?
- How Do I Disable the Balancer?
- How Do I Export and Import Events and Triggers in Batches?
- How Can I Migrate Databases or Tables Whose Names Contain Uppercase Letters?
- How Do I Delete Orphaned Documents in MongoDB Sharded Clusters?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more