You need to enable JavaScript to run this app.
Document Database for MongoDB

Document Database for MongoDB

Copy page
Download PDF
Parameter management
Modifying instance parameters
Copy page
Download PDF
Modifying instance parameters
Document Database for MongoDB allows custom settings for some parameter values. This topic describes how to configure parameters.​
Precautions​
After modifying some parameters, the instance needs to be restarted for the new parameter values to take effect. The instance restart time depends on the load status of the instance. During the restart process, the instance may experience 1-2 brief disconnections. Proceed with caution. It is recommended to perform the operation during off-peak hours and add a reconnection mechanism to the application to greatly reduce the impact of database connection interruptions on your business.​
Procedure​
  1. Log in to the MongoDB console.​
  1. In the upper-left corner of the top menu bar, select the project and region for instance.​
  1. Select either Replica set instances or Sharding instances in the left navigation bar depending on the instance type.​
  1. On the target instance type list page, click the target instance name.​
  1. On the instance details page, click the Parameters tab.​
  1. Under the Parameters tab, perform corresponding parameter modification operations according to the instance type.​
  • ​
    Instance type​
    Procedure​
    Replica set instance​
    On the Current parameter sub-tab, click Batch modification of parameters, find the parameters that need to be modified in the parameter list below, and set new parameter values according to business requirements.​
    Sharding cluster instance​
    1. Click the Mongos, Shards or ConfigServers tab according to the node type to which the parameter belongs.​
    1. On the Mongos, Shards, or ConfigServers tab, click Batch modification of parameters, find the parameter(s) that need to be modified in the parameter list, and set the new parameter value(s) according to your service needs.​
    ​
tip​
  • You can choose to modify one parameter or multiple parameters simultaneously based on your business needs.​
  • To undo the last modification, click Undo previous step in the upper-left corner of the parameter list. To cancel all parameter modifications for this session, click Cancel.​
  1. After completing the modification, click Submit in the upper-left corner of the parameter list.​
  1. In the popped-up dialog box, confirm the parameter values before and after the modification and whether the instance needs to be restarted for the modification to take effect, and then click OK.​
tip​
  • After modifying the parameters, the system takes a few seconds to send the parameter configuration to the instance. Therefore, if you modify parameters that require a restart to take effect, it is recommended to wait for 5 to 10 seconds after clicking OK, and then click Refresh in the upper right corner of the instance page. At this time, you will see the instance enter the Restarting status. When the instance status shows as Running, it indicates that the parameter modification was successful.​
  • The instance restart time depends on the load status of the instance. During the restart process, the instance may experience 1-2 brief disconnections. Proceed with caution. It is recommended to perform the operation during off-peak hours and add a reconnection mechanism to the application to greatly reduce the impact of database connection interruptions on your business.​
Subsequent operations​
After successfully modifying the parameters, you can view the details of parameter modifications made under the Parameter modification history tab, including the name of the modified parameters, the values before and after modification, the parameter modification status, and the modification time. For specific procedures, refer to Viewing parameter modification history.​
Relevant APIs​
​
API​
Description​
Call the DescribeDBInstanceParameters API to query list of parameters supported by target MongoDB instance.​
Call the ModifyDBInstanceParameters API to modify specified parameters of target MongoDB instance.​
​
​
Last updated: 2026.02.09 17:03:13