java - MongoDB连接问题,prematurely reached end of stream
巴扎黑
巴扎黑 2017-04-17 17:21:14
0
5
2609

使用mongo-java-driver-3.2.0.jar 报错,偶尔出现,但出现了就只能重启程序了

com.mongodb.MongoSocketReadException: Prematurely reached end of stream

com.mongodb.connection.SocketStream.read(SocketStream.java:88)
com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:491)
com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:221)
com.mongodb.connection.CommandHelper.receiveReply(CommandHelper.java:134)
com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:121)
com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)
com.mongodb.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:83)
com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:43)
com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127)
巴扎黑
巴扎黑

Antworte allen(5)
阿神

如何解决的 同样的问题

刘奇

问题解决了吗?能否分享?我遇到了,偶尔出现,都不懂怎么解决了

伊谢尔伦

mongodb链接数已满会出现这个问题,解决方法:释放连接、重启实例

Peter_Zhu

同求,是怎么解决的? 我是使用ExecutorService并发插入时经常出现这个问题

Ty80

推荐使用https://github.com/T-baby/Mon... 来连接和操作mongodb,十分钟就可上手,666666的

Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage