PoolClearedOnNetworkError: ...mongodb.net:27017 interrupted due to server monitor timeout

Hey @WONG_TUNG_TUNG,

The error generally indicates intermittent network instability. The driver cancels the ongoing operations to a node when a network timeout occurs (i.e., the heartbeat takes longer than connectTimeoutMS), assuming that a timeout indicates server unreachability. To address this I’d recommend checking out this post and monitoring the network changes.

Also to read more about it please refer to Connection Monitoring - MongoDB Specification. In case of any further questions, feel free to reach out!

Best regards,
Kushagra

1 Like