Kafka broker startup memory issue Kafka broker startup memory issue hadoop hadoop

Kafka broker startup memory issue


So I believe the error that you're getting is about RAM memory, not SSD memory.

I did a quick google search and it seems like the t2.micro account only has 1gb of RAM? Is that correct? From the error, and from this Stack Overflow Answer, it seems as though you don't have enough RAM. It says malloc requested 986mb or memory, which is basically 1gb and you only have 1gb on your machine.


It was a memory issue. I updated the value for minimum and maximum memory allocation in kafka-server-startup.sh and zookeeper-server-start.sh as export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M" and started zookeeper and kafka servers both worked fine. Thanks


If the same change needs to be done for Confluent Kafka. For centos, modify the /usr/lib/systemd/system/confluent-kafka.service file and pass the "KAFKA_HEAP_OPTS=-Xmx512M -Xms512M" values in that file. This protects environment from upgrade(s). And then systemctl daemon-reload. Check the values of the new kafka by running status on the service systemctl status confluent-kafka.