rocketmq-docker icon indicating copy to clipboard operation
rocketmq-docker copied to clipboard

Can not set custom MAX_HEAP_SIZE and HEAP_NEWSIZE

Open hq-git opened this issue 2 years ago • 2 comments

BUG REPORT

  1. Please describe the issue you observed:

    • I want to run rocketmq container and set a limit for the max heap size.

    • I want to through adding a docker container environment variable e.g. MAX_HEAP_SIZE to set the limit for the max heap size.

    • The script https://github.com/apache/rocketmq-docker/blob/master/image-build/scripts/runbroker-customize.sh using calculate_heap_sizes function to calculate heap size, which often makes the MAX_HEAP_SIZE too large and causing OOM.

  2. Please tell us about your environment:

    • Run multiple rocketmq containers on one host.
  3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):

    • The runbroker-customize.sh calculate_heap_sizes function will not overrides the values of MAX_HEAP_SIZE and HEAP_NEWSIZE variables, when they already have values.

hq-git avatar Oct 13 '23 10:10 hq-git

broker setup
copy an runbroker.sh,runserver.sh
-v ./data/broker/bin/runbroker.sh:/home/rocketmq/rocketmq-${ROCKETMQ_VERSION}/bin/runbroker.sh
-v ./data/broker/bin/runserver.sh:/home/rocketmq/rocketmq-${ROCKETMQ_VERSION}/bin/runserver.sh

jsbxyyx avatar Nov 15 '23 11:11 jsbxyyx

+1

supery-chen avatar Mar 18 '24 02:03 supery-chen