Cp-docker-images: Kafka Connect v4.1.2 requires more memory

Created on 11 Sep 2018  路  8Comments  路  Source: confluentinc/cp-docker-images

We were using kafka connect v3.2.2 and after upgrading to v4.1.2 it now requires much more memory.
It is deployed to k8s and it requires 2Gb without any connector running and it requires 3Gb when a simple file text sink is running.
When using v3.2.2 only 1G was required
Is there any configuration or solution to reduce this memory consumption?

Thanks

Most helpful comment

Hi guys ! I fixed this issue with this (edit: when you're running in a container):

KAFKA_HEAP_OPTS = "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2"

All 8 comments

The default max heap increased to 2G for Connect.

You can set the KAFKA_HEAP_OPTS variable to change it

First, thanks for the info.
To be sure about your suggestion, do you mean that I have to decrease the value of Xmx using that variable KAFKA_HEAP_OPTS on theKafka instance? I'm running Connect on it's own docker container

Thanks

Connect and the brokers share the same set of environment variables for those properties

Ok, thanks

@hectorgarzon Feel free to close this ticket, if that answered your questions

Hi guys ! I fixed this issue with this (edit: when you're running in a container):

KAFKA_HEAP_OPTS = "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2"

@jocelyndrean That only applies if running in a container or a systemd cgroup, correct? I.e. it's not a general solution for out of memory problems in connect

Yes sorry you're right @cricket007 it's only a solution when you're running in a container 馃檹

Was this page helpful?
0 / 5 - 0 ratings