# Not able to increase java heap size for Graylog6 container

**URL:** <https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182>\
**Category:** Graylog Central (peer support)\
**Created:** [August 7, 2025, 8:22am UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182 "2025-08-07T08:22:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![I\_am\_winner](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@I\_am\_winner](https://community.graylog.org/u/I_am_winner)\
**Post date:** [August 7, 2025, 8:22am UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/1 "2025-08-07T08:22:41Z")

</div>

Hello,

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/2/d/2d8a17ba398dc6d70f60eec17d10e7237d213d29.png)

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.

---

<div class="post-metadata">

**Author:** ![Tdvorak](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Tdvorak](https://community.graylog.org/u/Tdvorak)\
**Post date:** [August 7, 2025, 12:44pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/2 "2025-08-07T12:44:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![I\_am\_winner](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@I\_am\_winner](https://community.graylog.org/u/I_am_winner)\
**Post date:** [August 7, 2025, 12:59pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/4 "2025-08-07T12:59:17Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Tdvorak](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Tdvorak](https://community.graylog.org/u/Tdvorak)\
**Post date:** [August 7, 2025, 1:06pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/5 "2025-08-07T13:06:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![I\_am\_winner](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@I\_am\_winner](https://community.graylog.org/u/I_am_winner)\
**Post date:** [August 7, 2025, 1:08pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/6 "2025-08-07T13:08:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tdvorak](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Tdvorak](https://community.graylog.org/u/Tdvorak)\
**Post date:** [August 7, 2025, 2:07pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/7 "2025-08-07T14:07:19Z")

</div>

Yep, it’s datanode only configuration.

---

<div class="post-metadata">

**Author:** ![I\_am\_winner](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@I\_am\_winner](https://community.graylog.org/u/I_am_winner)\
**Post date:** [August 7, 2025, 6:18pm UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/9 "2025-08-07T18:18:52Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Tdvorak](https://avatars.discourse-cdn.com/v4/letter/t/a88e57/32.png) [@Tdvorak](https://community.graylog.org/u/Tdvorak)\
**Post date:** [August 8, 2025, 5:25am UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/10 "2025-08-08T05:25:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [August 22, 2025, 5:26am UTC](https://community.graylog.org/t/not-able-to-increase-java-heap-size-for-graylog6-container/36182/11 "2025-08-22T05:26:10Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
