When using MongoDBIO on a large collection with large documents on average, then the split vector command results in a lot of splits if the desired bundle size is small. In extreme cases, the response from the split vector command can be larger than 16mb which is not supported by pymongo / MongoDB:
pymongo.errors.ProtocolError: Message length (33699186) is larger than server max message size (33554432)
Environment: Was running this on Google Dataflow / Beam Python SDK 2.20.
Imported from Jira BEAM-9960. Original Jira may contain additional context.
Reported by: corvin.