If you use the Mongo Shell to log on to a MongoDB database of the Liunx instance, the following error message is displayed.
org.springframework.data.mongodb.UncategorizedMongoDbException: Timeout while receiving message; nested exception is com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message
- Abnormal slow queries occupy instance resources, causing CPU usage to surge or even peak.
- The configuration of the application connection pool, such as the timeout setting, is incorrect.
Alibaba Cloud reminds you that:
- Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
- Check whether the Mongo Shell instance has slow queries. We recommend that you add indexes to optimize the query speed. For more information, see analyze slow database requests.
- How to manage and configure the connection pool of a Mongo Shell instance. For more information, see query and limit the number of connections.
- Connect to an ApsaraDB for MongoDB instance over the Internet
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when their network types are different
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when they are in different regions
- How to connect an ECS instance to an ApsaraDB for MongoDB instance when they do not belong to the same Alibaba Cloud account
- ApsaraDB for MongoDB