MongoDB 2.2数据库连接的并发请求已超出限制

时间:2013-06-19 13:12:33

标签: mongodb connection-pooling

我在分片配置中使用mongodb:

  • 2 Mongos服务器
  • 2个分片
  • 1个配置服务器
  • 7个应用程序服务器
  • 1个读取服务器

我们正在使用mongo 2.0版本,每件事情都很好。 但我们现在已升级到mongo 2.2以使用聚合功能。 升级后,我们在应用服务器上收到信号量错误,该服务器将数据写入mongo。

我已经设置了:

  • connectionPerhost to 100
  • ThreadsAllowedToBlockForConnectionMultiplier为60
  • MaxWaitTime至5000毫秒

请帮助我摆脱这个错误,因为当我们使用mongodb 2.0版时它不存在。

com.mongodb.DBPortPool$SemaphoresOut: Concurrent requests for database connection have exceeded limit of 15000
        at com.mongodb.DBPortPool.get(DBPortPool.java:211)
        at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:440)
        at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:177)
        at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
        at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:270)
        at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:226)
        at com.mongodb.DBCollection.insert(DBCollection.java:147)
        at com.mongodb.DBCollection.insert(DBCollection.java:90)
        at com.mongodb.DBCollection.save(DBCollection.java:809)
        at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:731)
        at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:793)
        at com.google.code.morphia.DatastoreImpl.save(DatastoreImpl.java:787)
        at com.til.ibeat.dao.mongo.PageTrendLogDaoMongo.saveLog(PageTrendLogDaoMongo.java:54)
        at com.til.ibeat.service.PageTrendLogService.writeLog(PageTrendLogService.java:23)
        at com.til.ibeat.controller.PageTrendLoggingController.handleRequest(PageTrendLoggingController.java:181)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:525)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at com.redhat.jboss.support.ConfigureSessionCookieValve.invoke(ConfigureSessionCookieValve.java:25)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)

0 个答案:

没有答案