rocketmq-docker
rocketmq-docker copied to clipboard
Can not set custom MAX_HEAP_SIZE and HEAP_NEWSIZE
BUG REPORT
-
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_SIZEto 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_sizesfunction to calculate heap size, which often makes the MAX_HEAP_SIZE too large and causing OOM.
-
-
Please tell us about your environment:
- Run multiple rocketmq containers on one host.
-
Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
- The runbroker-customize.sh
calculate_heap_sizesfunction will not overrides the values ofMAX_HEAP_SIZEandHEAP_NEWSIZEvariables, when they already have values.
- The runbroker-customize.sh
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
+1