kafka-docker
kafka-docker copied to clipboard
After kafka is used for a period of time, the memory will continue to rise until it runs out of memory.
After kafka is used for a period of time, the memory will continue to rise until it runs out of memory.
However, in fact, Kafka has only 3 low-frequency consumers working continuously, and the available memory allocated to Kafka is 4G.
The following are the startup parameters of kafka:
docker run -d --name kafka --restart=always \
--log-driver json-file --log-opt max-size=100m --log-opt max-file=2 \
-p 9092:9092 \
-e KAFKA_HEAP_OPTS=-Xmx4G \
-e KAFKA_LOG_RETENTION_HOURS=1 \
-e KAFKA_LOG_CLEANUP_POLICY=delete \
-e KAFKA_LOG_RETENTION_BYTES=1073741824 \
-e KAFKA_LOG_SEGMENT_BYTES=268435456 \
-e KAFKA_LOG_RETENTION_MS=300000 \
-e KAFKA_BROKER_ID=0 \
-e KAFKA_ZOOKEEPER_CONNECT=127.0.0.1:2181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 \
-e KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092 -t wurstmeister/kafka
The running version is:kafka_2.13-2.8.1
How to troubleshoot or solve this situation? thank you very much!
I have stumbled upon the same problem, did you manage to solve the issue @bufanyun?