# DATA NODE - DOCKER HEADACHE - Java memory allocation

**URL:** <https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903>\
**Category:** Graylog Central (peer support)\
**Created:** [January 28, 2026, 10:27am UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903 "2026-01-28T10:27:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![psfletchthetek](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@psfletchthetek](https://community.graylog.org/u/psfletchthetek)\
**Post date:** [January 28, 2026, 10:27am UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903/1 "2026-01-28T10:27:38Z")

</div>

Hi all,

Hoping you can help, Graylog is stating that the data node is only configured for 1g of RAM in Java.

I can confirm that from HTOP that the variables of “-Xms1g -Xmx1g” can be seen against the datanode.

Now i have both of these inside my DOCKER environment variable.  
GRAYLOG\_OPENSEARCH\_HEAP: “4g”

```
  GRAYLOG_OPENSEARCH_JAVA_OPTS: “-Xms4g -Xmx4g”

```

But neither seem to be taking affect.

Any suggestions please?

I’ve tried OPENSEARCH\_HEAP and OPENSEARCH\_JAVA\_OPTS also as environmental variables with docker but with the same outcome. Still only 1g on xms and xmx!

Thanks all!

---

<div class="post-metadata">

**Author:** ![mitspieler](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mitspieler](https://community.graylog.org/u/mitspieler)\
**Post date:** [January 28, 2026, 2:44pm UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903/2 "2026-01-28T14:44:33Z")

</div>

I’m running Graylog on k8s and had to move the setting directly to the datanode.conf file. It was the only reliable way to set the heap for me.

---

<div class="post-metadata">

**Author:** ![psfletchthetek](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@psfletchthetek](https://community.graylog.org/u/psfletchthetek)\
**Post date:** [January 28, 2026, 3:31pm UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903/3 "2026-01-28T15:31:25Z")

</div>

Thought I might end up there.

Any ideas where the file is in the container to mount to it?

---

<div class="post-metadata">

**Author:** ![mitspieler](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mitspieler](https://community.graylog.org/u/mitspieler)\
**Post date:** [January 28, 2026, 3:55pm UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903/4 "2026-01-28T15:55:42Z")

</div>

I have it mounted as /etc/graylog/datanode/datanode.conf

The entry is just

opensearch\_heap: 1g

---

<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:** [February 11, 2026, 3:56pm UTC](https://community.graylog.org/t/data-node-docker-headache-java-memory-allocation/36903/5 "2026-02-11T15:56:15Z")

</div>

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