All Products
Search
Document Center

The system prompts "Timeout while receiving message" when logging on to apsaradb for MongoDB through the Mongo Shell from a Linux instance

Last Updated: Sep 24, 2020

Problem description

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

Cause

POSSIBLE CAUSES:

  • 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.

Solution

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.

Documentation

Application scope

  • ApsaraDB for MongoDB