Cosmodb回复消息长度错误,使用Mongo Java驱动程序执行查找 [英] Cosmodb reply message length error performing a find using the mongo java driver

查看:50
本文介绍了Cosmodb回复消息长度错误,使用Mongo Java驱动程序执行查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Mongo Java驱动程序3.4.2版尝试对包含约700个文档的集合执行查找查询已开始引发以下异常.
当集合较小时,不会发生这种情况.限制看起来要在连接过程中设置.

Using the Mongo Java Driver version 3.4.2 Trying to perform a find query on a collection that contains around 700 documents has started throwing the following exception.
This did not happen when the collection was smaller. The limits look to be set during the connection process.

! com.mongodb.MongoInternalException: The reply message length 4812632 is less than the maximum message length 4194304
! at com.mongodb.connection.ReplyHeader.<init>(ReplyHeader.java:74)
! at com.mongodb.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:498)
! at com.mongodb.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:224)
! at com.mongodb.connection.UsageTrackingInternalConnection.receiveMessage(UsageTrackingInternalConnection.java:96)
! at com.mongodb.connection.DefaultConnectionPool$PooledConnection.receiveMessage(DefaultConnectionPool.java:440)
! at com.mongodb.connection.CommandProtocol.execute(CommandProtocol.java:112)
! at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:168)
! at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:289)
! at com.mongodb.connection.DefaultServerConnection.command(DefaultServerConnection.java:176)
! at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:216)
! at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:207)
! at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:113)
! at com.mongodb.operation.FindOperation$1.call(FindOperation.java:516)
! at com.mongodb.operation.FindOperation$1.call(FindOperation.java:510)
! at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:431)
! at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:404)
! at com.mongodb.operation.FindOperation.execute(FindOperation.java:510)
! at com.mongodb.operation.FindOperation.execute(FindOperation.java:81)
! at com.mongodb.Mongo.execute(Mongo.java:836)
! at com.mongodb.Mongo$2.execute(Mongo.java:823)
! at com.mongodb.OperationIterable.iterator(OperationIterable.java:47)
! at com.mongodb.FindIterableImpl.iterator(FindIterableImpl.java:151)

推荐答案

根据您的错误信息,我查看了 feedback.azure.com ,以报告此问题以帮助解决.

According to your error information, I reviewed the related source codes of MongoDB Java driver which include ReplyHeader.java, and then I think it's a possible compatiblity bug for CosmosDB using MongoDB wire protocol, but I'm not sure for that without reproducing your issue. Please post a feedback to feedback.azure.com to report this issue to help resolving it.

这篇关于Cosmodb回复消息长度错误,使用Mongo Java驱动程序执行查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆