[SERVER-83608] gRPC session closes with findOne on 10MB message Created: 27/Nov/23  Updated: 01/Dec/23  Resolved: 01/Dec/23

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

Type: Bug Priority: Major - P3
Reporter: Erin McNulty Assignee: Erin McNulty
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2023-12-11
Participants:

 Description   

While doing performance testing, I encountered this bug
MongoDB Enterprise > let reallyLongMsg = 'x'.repeat(10 * 1024 * 1024)
MongoDB Enterprise > db.findOneLargeMsgBM.insert({name: reallyLongMsg})
WriteResult({ "nInserted" : 1 })
MongoDB Enterprise > db.findOneLargeMsgBM.find({})
Error: network error while attempting to run command 'find' on host '127.0.0.1:27021' :: caused by :: dbclient error communicating with server 127.0.0.1:27021 :: caused by :: Unable to read from gRPC stream
MongoDB Enterprise > ^C
bye
{"t":

{{

{"$date":"2023-11-27T20:04:20.754Z"}

}}

,"s":"I", "c":"QUERY", "id":22791, "ctx":"js","msg":"Failed to end logical session","attr":{"lsid":{"id":{"$uuid":"e6e50f94-9b5b-48da-9cd8-276e4f48367c","error":

{"code":9001,"codeName":"SocketException","errmsg":"socket exception [FAILED_STATE] server [127.0.0.1:27021 failed]"}

}}}}
The gRPC stream seems to shut down when trying to read in a 10MB message. Notably this done insert the message, so it seems to be ok when writing a large message.

Investigate what is happening here, and fix the bug.



 Comments   
Comment by Githook User [ 01/Dec/23 ]

Author:

{'name': 'Erin McNulty', 'email': 'erin.mcnulty@mongodb.com', 'username': 'erin2722'}

Message: SERVER-83608: Use CreateCustomChannel with MaxMessageSizeBytes in gRPC client
Branch: master
https://github.com/mongodb/mongo/commit/d65f0ed46e5ed413e5696747c3dd2275770061b4

Generated at Thu Feb 08 06:52:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.