Michael Sonnleitner
08/09/2025, 7:12 PMkapa.ai
08/09/2025, 7:12 PMdestination INFO Malformed non-Airbyte record (connectionId = ...): Terminating due to java.lang.OutOfMemoryError: Java heap space This type of error is common in Airbyte when the destination connector tries to process a large volume of data and exceeds the allocated Java heap memory. This issue has been reported across several connectors and scenarios, including MongoDB, S3 Data Lake, and PubSub destinations, even when users have increased the memory limits at the connection or pod level. In many cases, the error occurs during the phase where data is copied from temporary to permanent storage or when large batches are being processed in memory. For example, similar errors have been observed in MongoDB and S3 Data Lake destinations, where increasing memory limits did not always resolve the issue, suggesting potential inefficiencies or memory leaks in the connector implementation itself or limitations in how Airbyte manages memory for large syncs [Java heapspace on source connector](https://github.com/airbytehq/airbyte/issues/51616), [[destination-mongodb] Out of memory error](https://github.com/airbytehq/airbyte/issues/48851), [[destination-s3-data-lake] Java out of memory issue](https://github.com/airbytehq/airbyte/issues/55714). If you are encountering this error, here are some steps that have been attempted by others: - Increasing the memory limits for the connection or the relevant Airbyte pods (e.g., via the Airbyte UI, values.yaml, or direct SQL updates to the connection's resource_requirements). - Ensuring that the underlying infrastructure (Kubernetes, Docker, VM) has sufficient available memory and that container limits are not being hit. - Reducing the batch size or the amount of data processed in a single sync, if possible. - Monitoring for connector-specific issues or inefficiencies, as some connectors may not efficiently flush or process data in batches, leading to excessive memory usage. However, in several cases, even with increased memory limits, the error persisted, indicating that the root cause may be within the connector's implementation or Airbyte's handling of large data volumes. If you continue to experience this issue after increasing memory, you may need to open a bug report with detailed logs and configuration, as this is an area where ongoing improvements are being tracked by the Airbyte team [[destination-s3-data-lake] Java out of memory issue](https://github.com/airbytehq/airbyte/issues/55714), [[destination-mongodb] Out of memory error](https://github.com/airbytehq/airbyte/issues/48851). In summary, the error means the destination ran out of Java heap memory while processing your sync. Increasing memory limits may help, but if the problem persists, it could be a connector or platform limitation that requires further investigation or a bug fix.