Connection Failure Message: Timeout while receiving message
Symptom
An error is reported when a Java driver is used to connect to a DDS instance. The error information is as follows:
org.springframework.data.mongodb.UncategorizedMongoDbException: Timeout while receiving message; nested exception is com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message
Possible Cause
- Slow queries occupy instance resources, causing the CPU usage to increase sharply or even reach the peak value.
- The connection pool of the application is incorrectly configured. As a result, the number of connections increases sharply and reaches the maximum number of connections supported by the DDS instance.
Fault Locating
- Check whether slow queries occupy instance resources.
- Check whether the configuration of the application connection pool is correct.
Solution
- Check whether slow queries exist. You can add indexes to optimize queries.
- Check whether the client uses the connection pool properly.
- Change the maximum number of connections supported by a DDS instance.
Background Information
The maximum number of connections depends on the instance specifications. When the maximum number of clients connected to an instance is reached, new client connection requests will be rejected.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot