Prevent Logstash/JVM from shutting down when memory usage is high


(bryan) #1

Besides using a buffer like Kafka or increasing the memory on the machines. Is there a way to prevent Logstash from using too much memory and shutting down. For example, have it make input plugins stop accepting new messages until it has memory to continue.


(Mark Walkom) #2

How does it shutdown, can you show logs?


(bryan) #3

I do not have my own logs ATM. But the logs were something along the lines of:

Error: Your application used more memory than the safety cap of 4G.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace


(Mark Walkom) #4

That looks like the OS stopping Logstash, not Logstash stopping itself.


(system) #5

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