Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set memory limits for confluentinc/confluent-local image #252

Open
hyzyla opened this issue Nov 10, 2023 · 1 comment
Open

Set memory limits for confluentinc/confluent-local image #252

hyzyla opened this issue Nov 10, 2023 · 1 comment

Comments

@hyzyla
Copy link

hyzyla commented Nov 10, 2023

I would like to reduce memory consumtion by kafka for local development

I've tried setting like that:

  kafka:
    image: confluentinc/confluent-local
    ports: ["9092:9092"]
    environment:
      KAFKA_OPTS: "-Xmx256m -Xms256m"

but got error:

 ===> Check if kafka brokers are up
kafka-1  | Invalid maximum heap size: -Xmx256m -Xms256m
kafka-1  | Error: Could not create the Java Virtual Machine.
kafka-1  | Error: A fatal exception has occurred. Program will exit.
kafka-1  | Error: kafka-ready check failed
kafka-1  | Usage:
kafka-1  |   ub kafka-ready <min-num-brokers> <timeout-secs> [flags]
kafka-1  | 
kafka-1  | Flags:
kafka-1  |   -b, --bootstrap-servers string   comma-separated list of kafka brokers
kafka-1  |   -c, --config string              path to the config file
kafka-1  |   -h, --help                       help for kafka-ready
kafka-1  |   -s, --security string            security protocol to use when multiple listeners are enabled.
kafka-1  |   -z, --zookeeper-connect string   zookeeper connect string
kafka-1  | 
kafka-1  | ===> Launching kafka-rest ... 

How to set memory limits for JVM for confluentinc/confluent-local image

@winfriedgerlach
Copy link

this works for us: KAFKA_HEAP_OPTS: -Xmx8g -Xms8g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants