-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.3
-
Component/s: None
-
None
-
Environment:Linux, Debian, MongoDB 2.2.0
Calling mycollection.insert() on a large array of objects, or even a single large object, can result in sending a message, with socket send(), that triggers the server-side error, whereby a received message > 48,000,000 bytes causes the recv() to fail as if there were a network error. The server has no way apparently to gracefully reject such large messages. Therefore the driver should detect when it is about to send a message > 48000000 bytes and issue an insert failure that can be handled appropriately.
See the server source file src/mongo/util/net/message_port.cpp for the hardwired 48000000 limit and its effect to drop the connection and trigger network-related behavior in the client driver such as retry, which is doomed to fail in this kind of case.
Further, this limit on the size of an insert should be documented.
Small example is attached.
- duplicates
-
PYTHON-414 Split batch inserts into maxMessageSizeBytes chunks
- Closed