Change default Mongo connection pool size in spring-boot
问题 I want to change the default size of connection pool provided by java mongodb driver which is 100 according to mongo docs. Below is the mongo client bean which I used to customize the connection pool size (refered this question). I set both min and max connectionPerHost attributes to 1 and ran 10 parallel worker threads which interact with the DB to make sure that my change is applied. @Bean public Mongo mongo() throws Exception { MongoClientOptions.Builder clientOptions = new