0

我在分片配置中使用 mongodb:

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

我们使用的是 mongo 2.0 版本,一切正常。但是我们现在已经升级到 mongo 2.2 以使用聚合功能。升级后,我们在将数据写入 mongo 的应用程序服务器上收到信号量错误。

我已经设置:

  • connectionPerhost 为 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)
4

0 回答 0