Insufficient memory to run logstash-keystore

Hi all,

Running logstash 7.17.3 on a 8 GB RHEL 8.5 with -Xms4g -Xmx4g.

Until now I was able to run "bin/logstash-keystore --path.settings ${LOGSTASH_CONF} list" command but now I get the following error:

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000070a660000, 4120510464, 0) failed; error='Not enough space' (errno=12)
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 4120510464 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /usr/share/logstash/hs_err_pid1058879.log

Is there anyone with the same problem on version 7.17.3?

I upgrade logstash from 7.17.1 to 7.17.3 on both QA and Production (about a week between QA and Prod) and now both have same memory problem.

Thank you.

It is trying to allocate 4GB of memory. If you have 8 GB of memory and a logstash instance is already using 4 GB of it you will not be able to allocate 4 GB.

Reduce -Xms4g.

Thank you for your reply.

Yes, I know I can configure a smaller value but Logstash it's configured with -Xms4g -Xmx4g since deployed long time ago and I always was able to use logstash-keystore utility.

Besides, official recomendations is:

  • The recommended heap size for typical ingestion scenarios should be no less than 4GB and no more than 8GB.

  • Set the minimum (Xms) and maximum (Xmx) heap allocation size to the same value to prevent the heap from resizing at runtime, which is a very costly process.

I suspect that something related to memory allocation by logstash-keystore changed on 7.17.X release.

Can someone reproduce the issue?


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