Not able to increase java heap size for Graylog6 container

Hello,

I am getting the notification on GraylogUI which says as below screenshot. I am using Graylog 6 container.

I tried the following in my docker-compose but still no luck. I tried to set in both data node and graylog container but not reflected.

graylog container:
hostname: “server”
image: “${GRAYLOG_IMAGE:-graylog/graylog:6.3}”
depends_on:
mongodb:
condition: “service_started”
datanode:
condition: “service_started”
entrypoint: “/usr/bin/tini – /docker-entrypoint.sh”
environment:
GRAYLOG_NODE_ID_FILE: “/usr/share/graylog/data/data/node-id”

GRAYLOG_SERVER_JAVA_OPTS: “-Xms3g -Xmx3g -XX:NewRatio=1 -XX:MaxMetaspaceSize=256m -server -XX:+ResizeTLAB -XX:-OmitStackTraceInFastThrow -XX:+UseG1GC”

———————————————————————————————————

Datanode container:

datanode:
image: “${DATANODE_IMAGE:-graylog/graylog-datanode:6.3}”
hostname: “datanode”
environment:
GRAYLOG_DATANODE_NODE_ID_FILE: “/var/lib/graylog-datanode/node-id”

OPENSEARCH_JAVA_OPTS: “-Xms3g -Xmx3g”

——————————————————————————————–
what could be the issue? Please help me on this.

Hi @I_am_winner

There is a datanode config property opensearch_heap that you need to configure in your datanode.conf, or alternatively, by configuring env property GRAYLOG_DATANODE_OPENSEARCH_HEAP.

This property and the notification itself is refering to the memory that will be used by the managed opensearch process in datanode.

Did you mean I need to add GRAYLOG_DATANODE_OPENSEARCH_HEAP in the datanode container right? so no need to add heap argument in graylog container right?

Datanode container:

datanode:
image: “${DATANODE_IMAGE:-graylog/graylog-datanode:6.3}”
hostname: “datanode”
environment:
GRAYLOG_DATANODE_NODE_ID_FILE: “/var/lib/graylog-datanode/node-id”

GRAYLOG_DATANODE_OPENSEARCH_HEAP: “-Xms3g -Xmx3g”

Is this correct?

the property itself and its usage is correct, the value would be simply 3g:

GRAYLOG_DATANODE_OPENSEARCH_HEAP: "3g"

The rest will happen automatically, meaning your opensearch in datanode will be started exactly as you are trying, with the -Xms3g -Xmx3g in the background.

Please confirm this should be configured in datanode container only but no in graylog container right?

Yep, it’s datanode only configuration.

@Tdvorak It is setting up but still it is showing the heap notification and suggested that minimum 50% of RAM should be set for example for 16GB RAM, need to set 7GB.

I set to 7g but now the graylog is not able to access with FQDN but able to access with IP.

That’s strange. Can you look into your datanode.log and see if there are any exceptions?