Aiven-Open / Aiven-Open/cloud-storage-connectors-for-apache-kafka

Out-of-Memory errors when sinking large topics

未關閉
#270 14 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
S3
主要語言
Java
星號
58
分支
39
平均合併
2 天 10 小時
30 天內合併 PR
5

描述

# Scenario Overview

We have several topics, each of them already containing gigabytes of data (~1-10 millions of records). We need to export the data to S3.

# Issue:

Using the Aiven S3 Connector we run into Out-of-memory errors indicating that the Kafka Connect JVM process does not have enough heap space.

# Consequences:

The S3 connector runs into errors.
The entire Kafka Connect cluster is lagging.
The Aiven CLI stops working and returns an 503 error.

# Details:

Looking at the logs it looks like the connector is permanently ingesting messages from the topic and storing them in memory.
(log messages come from [here](https://github.com/Aiven-Open/s3-connector-for-apache-kafka/blob/e4b3de3f29225dd912bf93d25dec8b6621eb9059/src/main/java/io/aiven/kafka/connect/s3/S3SinkTask.java#L117))

It looks like the connector is not fast enough in writing to S3 and thus the memory is not freed in time.

We managed to get rid of the Out-of-memory errors by scaling up the Kafka Connect cluster. However, this is not a suitable long-term solution as we would need to setup multiple such connectors in parallel in the future.

We would like to have something that gives us some control over the memory consumption of the connector, e.g., a configuration for the maximum size of the input records buffer.

PS: Trying out the Confluent S3 connector provided by Aiven (version 5.0.0) does not run into Out-of-memory errors and utilizes a lot less memory but it's not an option for us.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。