I am connecting from a Spring Boot application to a remote Cosmos DB on Azure (using the Mongo DB API). I use spring-boot-starter-data-mongodb
to connect to the DB with all default settings.
After a while I regularly see a SocketException being thrown which is leading to all current DB connections being closed by the mongo driver.
I can only reproduce this issue when connecting to the remote Cosmos DB. I have not been able to reproduce the issue when testing against a local MongoDB container.