# Elasticsearch 8.17.2: Native memory allocation (mmap) failed

**URL:** <https://discuss.elastic.co/t/elasticsearch-8-17-2-native-memory-allocation-mmap-failed/376485>\
**Category:** Elasticsearch\
**Tags:** runtime-fields\
**Created:** [March 27, 2025, 2:10pm UTC](https://discuss.elastic.co/t/elasticsearch-8-17-2-native-memory-allocation-mmap-failed/376485 "2025-03-27T14:10:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavlodvornikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavlodvornikov/32/141457_2.png) [@pavlodvornikov](https://discuss.elastic.co/u/pavlodvornikov)\
**Post date:** [March 27, 2025, 2:10pm UTC](https://discuss.elastic.co/t/elasticsearch-8-17-2-native-memory-allocation-mmap-failed/376485/1 "2025-03-27T14:10:26Z")

</div>

Hello,

I just recently upgraded my Elasticsearch cluster from 8.10.4 to 8.17.2. Prior to that I have not experienced memory issues with the same load.

Data nodes run on i4i.2xlarge EC2 instances with 64G RAM and 8 vCPU.

Elasticsearch runs on Ubuntu 20.04 and was installed using Debian package. And have memory locked with `bootstrap.memory_lock: true`, and jvm heap size set to `-Xms8g -Xmx8g`.

Since upgrade, Elasticsearch service occasionally crashes on one of data nodes with following log:

```auto
# journalctl -u elasticsearch.service

systemd-entrypoint[20439]: #
systemd-entrypoint[20439]: # There is insufficient memory for the Java Runtime Environment to continue.
systemd-entrypoint[20439]: # Native memory allocation (mmap) failed to map 16384 bytes. Error detail: committing reserved memory.
systemd-entrypoint[20439]: # An error report file with more information is saved as:
systemd-entrypoint[20439]: # /var/log/elasticsearch/hs_err_pid20439.log
systemd-entrypoint[20439]: [thread 219314 also had an error]
systemd-entrypoint[20439]: [thread 21332 also had an error]
systemd-entrypoint[20439]: [thread 219313 also had an error]
systemd-entrypoint[20439]: [thread 21335 also had an error]
systemd-entrypoint[20377]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fa20c630000, 16384, 0) failed; error='Not enough space' (errno=12)
systemd-entrypoint[20377]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fa2c0998000, 16384, 0) failed; error='Not enough space' (errno=12)
systemd-entrypoint[20377]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f8a65c9f000, 16384, 0) failed; error='Not enough space' (errno=12)
systemd-entrypoint[20377]: ERROR: Elasticsearch exited unexpectedly, with exit code 1
systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

```

There is no other heavy processes running on the same server. Just a couple of agents for collecting logs/metrics.

Would someone please give me some directions how to debug such thing?

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [March 27, 2025, 2:39pm UTC](https://discuss.elastic.co/t/elasticsearch-8-17-2-native-memory-allocation-mmap-failed/376485/2 "2025-03-27T14:39:32Z")

</div>

Wild guess but this thread had sonething similar.

> [@OOM since 8.16.1 with openjdk23](https://discuss.elastic.co/t/oom-since-8-16-1-with-openjdk23/371395):
>
> Hi, after upgrading from 8.15.1 to 8.16.1, all machines in two of our four ES clusters are running out of Memory after 7-12 hours. Our current setup for all clusters is: System: Ubuntu 22 3 master 3 data nodes (64GB RAM. 32GB Xmx. 48 CPUs) 2 kibana nodes The internal ES monitoring also does not show any issues with Heap. I can not directly upload it here, as the company does not allow it. If you need it, I can upload it to a image hoster of your choice. This is the message I can find in …

---

<div class="post-metadata">

**Author:** ![pavlodvornikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavlodvornikov/32/141457_2.png) [@pavlodvornikov](https://discuss.elastic.co/u/pavlodvornikov)\
**Post date:** [March 27, 2025, 4:08pm UTC](https://discuss.elastic.co/t/elasticsearch-8-17-2-native-memory-allocation-mmap-failed/376485/3 "2025-03-27T16:08:48Z")

</div>

> [@pavlodvornikov](#):
>
> 8.10.4 to 8.17.2

thanks, it indeed looks like the same issue, I'll follow up in that thread
