[SERVER-59766] MongoDB.Driver.MongoCommandException: Command aggregate failed: BufBuilder attempted to grow() to 134217728 bytes, past the 64MB limit Created: 03/Sep/21  Updated: 06/Dec/22  Resolved: 05/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Yogesh Jadhav Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Operating System: ALL
Participants:

 Description   

Hi Team,

 

I am getting 2 errors in MongoDB version 3.2.1 as per below.

1st Error : for 85 named Collection

MongoDB.Driver.MongoCommandException: Command getMore failed: BSONObj size: 40461879 (0x2696637) is invalid. Size must be between 0 and 16793600(16MB).

   at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.ProcessReply(ConnectionId connectionId, ReplyMessage`1 reply)

   at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.Execute(IConnection connection, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ClusterableServer.ServerChannel.ExecuteProtocol[TResult](IWireProtocol`1 protocol, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ClusterableServer.ServerChannel.Command[TResult](DatabaseNamespace databaseNamespace, BsonDocument command, IElementNameValidator commandValidator, Func`1 responseHandling, Boolean slaveOk, IBsonSerializer`1 resultSerializer, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.AsyncCursor`1.ExecuteGetMoreCommand(IChannelHandle channel, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.AsyncCursor`1.GetNextBatch(CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.AsyncCursor`1.MoveNext(CancellationToken cancellationToken)

   at MongoDB.Driver.IAsyncCursorExtensions.ToList[TDocument](IAsyncCursor`1 source, CancellationToken cancellationToken)

   at VU.DataAccessLayer.DatabaseUtil.Aggregate(Dictionary`2 parameters) in D:\Vikas\DevOps\Main\Source\Recon2-BeforeTaskSeparation\Presentation\VU.DataAccessLayer\DataBaseHelper_V1\DatabaseUtil.cs:line 2771

 

Second Error: for 942 named collection

 

MongoDB.Driver.MongoCommandException: Command aggregate failed: BufBuilder attempted to grow() to 134217728 bytes, past the 64MB limit..

   at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.ProcessReply(ConnectionId connectionId, ReplyMessage`1 reply)

   at MongoDB.Driver.Core.WireProtocol.CommandWireProtocol`1.Execute(IConnection connection, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ClusterableServer.ServerChannel.ExecuteProtocol[TResult](IWireProtocol`1 protocol, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Servers.ClusterableServer.ServerChannel.Command[TResult](DatabaseNamespace databaseNamespace, BsonDocument command, IElementNameValidator commandValidator, Func`1 responseHandling, Boolean slaveOk, IBsonSerializer`1 resultSerializer, MessageEncoderSettings messageEncoderSettings, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.CommandOperationBase`1.ExecuteProtocol(IChannelHandle channel, ServerDescription serverDescription, ReadPreference readPreference, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.CommandOperationBase`1.ExecuteProtocol(IChannelSource channelSource, ReadPreference readPreference, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.ReadCommandOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)

   at MongoDB.Driver.Core.Operations.AggregateOperation`1.Execute(IReadBinding binding, CancellationToken cancellationToken)

   at MongoDB.Driver.OperationExecutor.ExecuteReadOperation[TResult](IReadBinding binding, IReadOperation`1 operation, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, ReadPreference readPreference, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.ExecuteReadOperation[TResult](IReadOperation`1 operation, CancellationToken cancellationToken)

   at MongoDB.Driver.MongoCollectionImpl`1.Aggregate[TResult](PipelineDefinition`2 pipeline, AggregateOptions options, CancellationToken cancellationToken)

   at VU.DataAccessLayer.DatabaseUtil.Aggregate(Dictionary`2 parameters) in D:\Vikas\DevOps\Main\Source\Recon2-BeforeTaskSeparation\Presentation\VU.DataAccessLayer\DataBaseHelper_V1\DatabaseUtil.cs:line 2758

 
While copying data from RecData85 to RecData85Hist and while copying RecData942 to RecData942Hist. this error is coming. after this error is not coming contiguously. but when coming this error data is not getting copied to other historic table.

I am not understanding why its coming now after 3 yrs. We have not seen this error before on our PROD server.

 

 



 Comments   
Comment by Dmitry Agranat [ 05/Sep/21 ]

Hi yogeshtj889@gmail.com,

MongoDB 3.2 reached EOL in December 2015 and the SERVER project is for bugs or feature suggestions for supported versions of the MongoDB server.

For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

Regards,
Dima

Generated at Thu Feb 08 05:48:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.