# There is insufficient memory for the Java Runtime Environment to continue

**URL:** <https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926>\
**Category:** Elasticsearch\
**Created:** [September 7, 2022, 8:31pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926 "2022-09-07T20:31:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [September 7, 2022, 8:31pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/1 "2022-09-07T20:31:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 7, 2022, 9:04pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/2 "2022-09-07T21:04:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [September 8, 2022, 2:41pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/3 "2022-09-08T14:41:08Z")

</div>

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.

```auto
 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

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [September 8, 2022, 2:47pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/4 "2022-09-08T14:47:18Z")

</div>

Are you setting the heap size or is Elasticsearch using it's defaults? See [this section](https://www.elastic.co/guide/en/elasticsearch/reference/current/advanced-configuration.html#set-jvm-heap-size) 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?

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [September 8, 2022, 3:17pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/5 "2022-09-08T15:17:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)\
**Post date:** [September 8, 2022, 10:16pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/6 "2022-09-08T22:16:47Z")

</div>

> [@Akhil2](#):
>
> ```auto
> # 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)
> 
> ```

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

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 8, 2022, 10:50pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/7 "2022-09-08T22:50:46Z")

</div>

@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

```auto
-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.

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [September 12, 2022, 8:01pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/8 "2022-09-12T20:01:10Z")

</div>

Thank you @stephenb. it worked

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2022, 8:01pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue/313926/9 "2022-10-10T20:01:21Z")

</div>

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