There is insufficient memory for the Java Runtime Environment to continue

Hello all,

I am using ELK 8.4.1. I have a cluster setup with 3 nodes. But when I tried to Ingest data through Logstash it gave me following errors.

OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)

Can anyone please tell me if I can resolve this issue by changing Elasticsearch configuration? Do I have to add extra RAM to my machine? right now, it is 8 GB.

Please let me know.

Thank you,
Akhil

It'd be useful if you could share more of the error/log please.

Hi @warkolm

I am seeing this in terminal.

"OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455)
The process tried to write to a nonexistent pipe."

and in the logfile, I can see this.

 There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 1073741824 bytes for G1 virtual space
# Possible reasons:
#   The system is out of physical RAM or swap space
#   The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
#   JVM is running with Unscaled Compressed Oops mode in which the Java heap is
#     placed in the first 4GB address space. The Java Heap base address is the
#     maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
#     to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (os_windows.cpp:3541), pid=11976, tid=14164
#
# JRE version:  (17.0.4+8) (build )
# Java VM: OpenJDK 64-Bit Server VM (17.0.4+8, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#

Please let me know if you need more information.

Thank you,
Akhil

Are you setting the heap size or is Elasticsearch using it's defaults? See this section for the message you should see where Elasticsearch sets the heap size. I've seen Elasticsearch make unwise choices for heap size, I set it the old way. Maybe set yours to a small size to get Elastic to start.

Do you have a swap/paging file?

Hi @rugenl,

Sure, I am using default settings for elasticsearch. I have not touched anything but elasticsearch.yml file. I think I do not have a swap/paging file.

Thank you,
Akhil

The error lists some possible solutions. The easiest is probably to allocate a page file in Windows and try it again.

@Akhil2 Are running logstash and / or kibana and / or elasticsearch on the same host?

Elasticsearch will try to take 4GB of your 8 GB of RAM if it can not it will fail.

try setting in the jvm.option file

-Xms2g
-Xmx2g

Basically you are probably trying to run too much on a single small host.

Also if you are running multiple apps, start elasticsearch first so it can claim its memory.

1 Like

Thank you @stephenb. it worked

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