mongoDB连接异常

时间:2018-07-26 20:20:10

标签: java mongodb

我的Java应用程序在1小时内非常理想。 在mongoDB中出现连接错误并发出第二个请求,它工作正常

如何解决此问题?

  

MongoClient配置

     

mongo.connectionsPerHost = 100; mongo.connectTimeout = 3000; mongo.maxWaitTime = 3000   mongo.socketTimeout = 3000; mongo.socketKeepAlive = true

EXCEPTIONTRACE = com.mongodb.MongoSocketWriteException:com.mongodb.connection.InternalStreamConnection.translateWriteException(InternalStreamConnection.java:462)在com.mongodb.connection.InternalStreamConnection.sendMessage(InternalStreamConnection.java:205)处发送异常.mongodb.connection.UsageTrackingInternalConnection.sendMessage(UsageTrackingInternalConnection.java:95)位于com.mongodb.connection.DefaultConnectionPool $ PooledConnection.sendMessage(DefaultConnectionPool.java:424)位于com.mongodb.connection.CommandProtocol.sendMessage(CommandProtocol.java:209) )的com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:111)的com.mongodb.connection.DefaultServer $ DefaultServerProtocolExecutor.execute(DefaultServer.java:159)的com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection。 java:286)在com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:173)在com.mongodb.operation.CommandOperati位于com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:206)的onHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:215)位于com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java。 com.mongodb.operation的.FindOperation $ 1.call(FindOperation.java:487)。com的com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:239)的FindOperation $ 1.call(FindOperation.java:482)。 com.mongodb.operation.FindOperation.execute(FindOperation.java:482)的com.mongodb.operation.FindOperation.execute(FindOperation.java:79)的mongodb.operation.OperationHelper.withConnection(OperationHelper.java:212) .mongodb.Mongo.execute(Mongo.java:772)com.mongodb.Mongo $ 2.execute(Mongo.java:759)com.mongodb.OperationIterable.iterator(OperationIterable.java:47)在com.mongodb.FindIterableImpl

处的.iterator(FindIterableImpl.java:143)

0 个答案:

没有答案