we have are dealing with this error since ever... (basically after installing and start feeding it)
We changed jmx and jms from initial 1Gb to 2Gb and then to 4Gb and we are consistently dealing with this error almost ever at the same clock time... If we restart ELK at 9-10 AM then we will have logstash crashing with this error around 11PM.
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 java.lang.OutOfMemoryError: Java heap space stack trace
We are using Jenkins logstash plugin (1.2.0) to send data to logstash (6.0.0).
The logstash plugins versions we have are the following:
We have seen many old reports about this issue but for older versions of logstash that supposedly the next newer version fixed the "bug" in some multiline plugin... But in our case we using the latest version of everything!!
We are using jdk 8 u 151
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Perhaps Logstash isn't processing the events fast enough so your buffers are filling up? What kind of inbound message rate do you have? Is ES keeping up?
I'm not sure I'm getting your point. We are using jenkins plugin for logstash which is using syslog indexer type. The protocol is UDP (RFC5424). The messages we are sending are sent from hundreds of jenkins jobs which have hundreds if not thousands of lines...
We don't have control over the logstash calls cadence because jobs are running in continuous integration mode.
Don't think this has to do with ES because we are experiencing the Java Heap Space issue still in LS... Isn't that so?
Meanwhile I've also noticed additional output log message that might be useful...
Does this have to do with the fact we have several filter files?? I'm just saying because I see the following in the previous message:
By the way, we have migrated everything to the version 6.1.2 (LS+ES+KIBANA) and the problem is the same...
You've configured the udp input to have an internal queue of 72k messages. If that queue fills up because Logstash isn't able to process events (possibly because ES isn't able to accept messages sufficiently quickly) then Logstash is going to use some memory. However, even if the messages are 1k each the whole queue shouldn't use that much more than 72 MB. Sure, there's overhead but hardly enough to fill a 4 GB JVM heap. Perhaps there's a memory leak somewhere?
Basically we had an exception in "logstash.stdout" (during ELK startup) stating that the file "logstash-slowlog-plain.log" was not possible to be created. (lack of permissions for ELK user in the folder where that file was supposed to be created "log")
By fixing the permissions issue we have no longer that exception in log and ELK is running for already 2 days without interruption (which we never had untill now)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.