MongoDB数据库连接池设置

时间:2021-12-09 05:39:31

MongoDB数据库连接池设置

 

 关键词:com.mongodb.DBPortPool$SemaphoresOut: Out of semaphores to get db


   今天做MongoDB并发测试,报出上述错误。究其原因,是数据库连接数太少,资源耗尽。查看com.mongodb.MongoOptions源代码,其中有connectionsPerHost和threadsAllowedToBlockForConnectionMultiplier两个重要的属性...

 

详细地址:http://howsun.blog.sohu.com/173684790.html