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

使用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)
巴扎黑
巴扎黑

reply all(5)
阿神

How to solve the same problem

刘奇

Has the problem been solved? Can you share it? I encountered it, it happens occasionally, and I don’t know how to solve it

伊谢尔伦

This problem will occur when the number of mongodb links is full. The solution: release the connection and restart the instance

Peter_Zhu

Same request, how to solve it? This problem often occurs when I use ExecutorService for concurrent insertion

Ty80

It is recommended to use https://github.com/T-baby/Mon... to connect and operate mongodb. You can get started in ten minutes, 666666

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!