logstash icon indicating copy to clipboard operation
logstash copied to clipboard

Auxiliary tools like logstash-keystore need better JVM setting defaults

Open jsvd opened this issue 3 years ago • 1 comments

The config/jvm.options file allows defining JVM settings like Xmx for Logstash. The same settings are also used for the plugin manager and other tools like the logstash-keystore, which can be problematic.

And example of this is that, if Xmx is set to 8gb on a 16gb RAM machine, starting the logstash-keystore while Logstash is running will need to allocate 16gb of RAM (a bit more in reality), which will cause the second execution to terminate with a "failed to reserve memory" error.

The current workaround is to run these tools with "LS_JAVA_OPTS" environment variable, which will override the existing settings. In the case of Xmx, you can do LS_JAVA_OPTS="-Xmx512m" bin/logstash-keystore <..>

jsvd avatar May 26 '22 14:05 jsvd

is there maybe another way of dealing with logstash-keystore? Do we really need a JVM for creating secret files? (ruby implementation?)

danriedl avatar Jun 20 '22 08:06 danriedl