Hey @michael_hyman1,
The PoolClearedError can occur due to Intermittent network outages that cause the driver to lose connectivity.
Essentially, this error happens when the driver believes the server associated with a connection pool is no longer available. The pool gets cleared and closed so that operations waiting for a connection can retry on a different server.
To address this:
- Enable retryability in your application if you haven’t already. This allows operations to retry seamlessly on another server.
- Enable SDAM (Server Discovery and Monitoring) monitoring to understand why servers are being marked unknown.
- Similarly, enable connection-level monitoring to see network errors and events.
- Check the cluster’s logs for elections, failovers, and step-downs that could be disrupting connectivity.
- Ensure the cluster itself is healthy and members are communicating properly.
Let me know if you have any other questions!
Regards,
Kushagra