# There is insufficient memory for the Java Runtime Environment to continue while using --config.test\_and\_exit

**URL:** <https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue-while-using-config-test-and-exit/273561>\
**Category:** Logstash\
**Created:** [May 20, 2021, 3:42pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue-while-using-config-test-and-exit/273561 "2021-05-20T15:42:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kosodrom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kosodrom/32/99278_2.png) [@Kosodrom](https://discuss.elastic.co/u/Kosodrom)\
**Post date:** [May 20, 2021, 3:42pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue-while-using-config-test-and-exit/273561/1 "2021-05-20T15:42:59Z")

</div>

When I try to test the config of my logstash pipeline I run into this error:

```
[bash]$ logstash --config.test_and_exit -f /path/to/config.conf
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000714cc0000, 3946053632, 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 3946053632 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /path/to/hs_err_pid42940.log

```

I have a 8G node vm of which I have have configued 4g to logstash heap:

```
-Xms4g
-Xmx4g

```

I cannot see any sort of memory problems on this machine right now. Do you know what I have this error?

Thanks

---

<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:** [June 17, 2021, 3:43pm UTC](https://discuss.elastic.co/t/there-is-insufficient-memory-for-the-java-runtime-environment-to-continue-while-using-config-test-and-exit/273561/2 "2021-06-17T15:43:43Z")

</div>

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