CRE-2025-0115
MongoDB client disconnects and socket exceptions under loadHighImpact: 8/10Mitigation: 6/10
CRE-2025-0115View on GitHub
Description
- Under high client load or resource exhaustion (e.g., 1 CPU, 500MB RAM), MongoDB can begin to log a large number of socket disconnections and broken pipe errors.
- This results in frequent connection churn, interrupted operations, and possible failed writes.
Cause
- Client connections are dropped because of resource exhaustion (e.g., memory pressure or CPU starvation).
- The MongoDB server cannot respond in time, causing broken pipes and socket disconnects.
Mitigation
- Add more CPU and memory resources.
- Introduce connection pooling and rate limiting on the client side.
- Optimize MongoDB queries and schema to reduce pressure.
- Monitor and alert on connection and socket exception patterns.