<@U04S8PLJWMT> Command failed with error 10334 (BS...
# ask-ai
a
@kapa.ai Command failed with error 10334 (BSONObjectTooLarge): 'BSONObj size: 19012632 (0x1221C18) is invalid. Size must be between 0 and 16793600(16MB) First element: operationTime: Timestamp(1759845391, 255)' on server 172.17.0.1:27017. The full response is {"operationTime": {"$timestamp": {"t": 1759845391, "i": 255}}, "ok": 0.0, "errmsg": "BSONObj size: 19012632 (0x1221C18) is invalid. Size must be between 0 and 16793600(16MB) First element: operationTime: Timestamp(1759845391, 255)", "code": 10334, "codeName": "BSONObjectTooLarge", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1759845391, "i": 255}}, "signature": {"hash": {"$binary": {"base64": "8Imr4H5xV0+prwQ3VsF6l9ag6+Q=", "subType": "00"}}, "keyId": 7534321094811975685}}} at com.mongodb.internal.operation.QueryHelper.translateCommandException(QueryHelper.java:29)
k
The error message you are seeing:
Copy code
Command failed with error 10334 (BSONObjectTooLarge): 'BSONObj size: 19012632 (0x1221C18) is invalid. Size must be between 0 and 16793600(16MB)
means that a document being processed by MongoDB exceeds the maximum allowed BSON document size of 16MB. This is a hard limit in MongoDB, and any attempt to insert or process a document larger than this will result in the error you are seeing. In the context of Airbyte: - Airbyte Cloud documentation confirms that the maximum size of a record in MongoDB is 16MB. Records larger than this will need to be modified. If a record cannot be stored due to this limit, Airbyte will attempt to adjust the record, but if it cannot, the sync may fail. Any modifications to the record will be stored within
airbyte_meta.changes
for your review within the destination. However, if the document is simply too large, the sync will fail with the error you are seeing. This is a MongoDB limitation, not specific to Airbyte, but Airbyte must respect it for successful syncs [Understand Airbyte Cloud limits](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/understand-airbyte-cloud-limits). What you can do: - Ensure that no single document in your source exceeds 16MB before syncing to MongoDB. - If you have control over the source data, consider splitting large documents into smaller ones. - If you are using Airbyte's typing and deduping features, Airbyte may attempt to trim the record, but this is not always possible for extremely large documents. If you need more details on how Airbyte handles large records or how to adjust your syncs, please refer to the Airbyte documentation or the MongoDB documentation for BSON size limits. If you need further troubleshooting steps, let me know the context (source, destination, connector version) and I can help you look for more specific guidance.
a
@kapa.ai how can i adjust that record or increase size
k
A message from kapa.ai
You cannot increase the maximum BSON document size in MongoDB—it is a hard limit of 16MB per document, set by MongoDB itself. This limit cannot be changed or configured. If you attempt to sync a record larger than 16MB, MongoDB will reject it with the error you encountered. How to handle this in Airbyte: - Adjust the record: You must modify your source data so that no single document exceeds 16MB. This typically means splitting large documents into smaller ones before syncing. - Airbyte’s handling: Airbyte will attempt to adjust records that are too large for the destination. For MongoDB, if a record exceeds 16MB, Airbyte will retain the primary key and cursor, but all other data in the record will be nulled. Any modifications to the record will be stored within
airbyte_meta.changes
for your review within the destination. However, if the document cannot be trimmed to fit the limit, the sync will fail [Airbyte Cloud limits](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/understand-airbyte-cloud-limits). Summary: - You cannot increase the 16MB limit in MongoDB. - You must ensure your records are smaller than 16MB before syncing. - Airbyte will try to help, but cannot bypass this MongoDB restriction. If you need to process larger data, consider redesigning your data model to split large documents into multiple smaller ones before syncing to MongoDB.
a
@kapa.ai how can i do this consider redesigning your data model to split large documents into multiple smaller ones before syncing to MongoDB.
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain specific instructions or examples on how to redesign your data model to split large documents into multiple smaller ones before syncing to MongoDB. The documentation does confirm that MongoDB has a strict 16MB document size limit and suggests that records larger than this must be modified or split, but it does not provide concrete steps or code for how to perform this transformation within Airbyte or in your source system [Airbyte Cloud limits](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/understand-airbyte-cloud-limits). If you need guidance on how to implement this, you may need to preprocess your data outside of Airbyte, ensuring that no single document exceeds the 16MB limit before syncing. If you have more details about your data structure or use case, I can help you look for relevant transformation strategies if they become available in the documentation.
a
@kapa.ai how i can check which table has this issue as logs does not show exact name
k
A message from kapa.ai
The knowledge sources do not provide a direct method for identifying which specific table or collection contains documents exceeding the 16MB limit when the logs do not show the exact name. However, Airbyte does record detailed logs for each sync, which can be helpful for troubleshooting. You can access these logs via the Airbyte UI by navigating to the connection's Job History tab, selecting the relevant sync, and viewing or downloading the logs. Searching for keywords like
Error
,
Exception
, or
Fail
may help you locate more context around the error, though the logs may not always specify the table or collection name if the error is thrown at a lower level [Browsing logs](https://docs.airbyte.com/platform/operator-guides/browsing-output-logs). If the logs do not provide the table name, you may need to: - Review your source data for large documents. - Check collections with known large or complex documents. - Consider adding additional logging or validation in your source system to flag oversized documents before syncing. Unfortunately, based on the current documentation, there is no built-in Airbyte feature that automatically identifies the problematic table or collection in this scenario.