If you are running Graylog in a Docker Container or Docker-Compose, you will sooner or late experience, that the Graylog-Server will use most of it’s heap space, which is set to 4Gi by default.
Assuming your Docker-Host has some more Memory to spare, you can increase the Heap Size by using an environment variable.
Set the -Xms
to you desired minimum used memory and -Xmx
to the allowed maximum.
services:
graylog:
hostname: "server"
image: "${GRAYLOG_IMAGE:-graylog/graylog:6.0}"
...
environment:
# Xms: minimum allocated memory
# Xmx: maximum allocated memory
GRAYLOG_SERVER_JAVA_OPTS: "-Xms2g -Xmx8g -XX:NewRatio=1 -server -XX:+ResizeTLAB -XX:-OmitStackTraceInFastThrow"
ports:
...
Now restart the containers
docker compose up -d
and your Graylog-Server should now be able to use more memory.