# Insufficient memory - OpenJDK 64-Bit Server VM warning

**URL:** <https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567>\
**Category:** Logstash\
**Created:** [March 5, 2016, 3:28am UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567 "2016-03-05T03:28:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabe](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gabe](https://discuss.elastic.co/u/gabe)\
**Post date:** [March 5, 2016, 3:28am UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/1 "2016-03-05T03:28:31Z")

</div>

Topbeat Logstash Elasticsearch seem to be working okay.

Started the configuration of Logstash syslog (rsyslog) input using the example file:  
[https://www.elastic.co/guide/en/logstash/current/config-examples.html#\_processing\_syslog\_messages](https://www.elastic.co/guide/en/logstash/current/config-examples.html#_processing_syslog_messages)

**Java memory error - only running elastic applications**

**logstash-syslog.conf**

`  
input {  
beats {  
port =\> 5044  
}  
tcp {  
port =\> 5000  
type =\> syslog  
}  
udp {  
port =\> 5000  
type =\> syslog  
}  
}

filter {  
if [type] == "syslog" {  
grok {  
match =\> { "message" =\> "%{SYSLOGTIMESTAMP:syslog\_timestamp} %{SYSLOGHOST:syslog\_hostname} %{DATA:syslog\_program}(?:[%{POSINT:syslog\_pid}])?: %{GREEDYDATA:syslog\_message}" }  
add\_field =\> ["received\_at", "%{@timestamp}"]  
add\_field =\> ["received\_from", "%{host}"]  
}  
date {  
match =\> ["syslog\_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]  
}  
}  
}

output {  
elasticsearch {  
hosts =\> "localhost:9200"  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{+YYYY.MM.dd}"  
document\_type =\> "%{[@metadata][type]}"  
}  
}  
`

**logstash -f logstash-syslog.conf**

'  
OpenJDK 64-Bit Server VM warning: INFO: os::commit\_memory(0x00000000b5a00000, 357892096, 0) failed; error='Cannot allocate memory' (errno=12)

# 

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

# Native memory allocation (malloc) failed to allocate 357892096 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /tmp/hs\_err\_pid36398.log

`  
**Glances**

VIRT RES CPU% MEM% PID USER NI S TIME+ IOR/s IOW/s NAME

7.0G 685M 9.6 0.6 11886 logstash 19 S 15:35.35 0 0 java  
9.7G 454M 0.0 0.4 26798 elasticse 0 S 59:00.69 0 0 java

**/tmp/hs\_err\_pid36398.log**

`

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

# Native memory allocation (malloc) failed to allocate 357892096 bytes for committing reserved memory.

# Possible reasons:

# The system is out of physical RAM or swap space

# In 32 bit mode, the process size limit was hit

# Possible solutions:

# Reduce memory load on the system

# Increase physical memory or swap space

# Check if swap backing store is full

# Use 64 bit Java on a 64 bit OS

# Decrease Java heap size (-Xmx/-Xms)

# Decrease number of Java threads

# Decrease Java thread stack sizes (-Xss)

# Set larger code cache with -XX:ReservedCodeCacheSize=

# This output file may be truncated or incomplete.

# 

# Out of Memory Error (os\_linux.cpp:2827), pid=36398, tid=140689424713472

# 

# JRE version: (7.0\_95) (build )

# Java VM: OpenJDK 64-Bit Server VM (24.95-b01 mixed mode linux-amd64 compressed oops)

# Derivative: IcedTea 2.6.4

# Distribution: Ubuntu 14.04.3 LTS, package 7u95-2.6.4-0ubuntu0.14.04.1

# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

# 

--------------- T H R E A D ---------------

Current thread (0x00007ff4c8008800): JavaThread "Unknown thread" [\_thread\_in\_vm, id=36412, stack(0x00007ff4cf0f0000,0x00007ff4cf2f1000)]

Stack: [0x00007ff4cf0f0000,0x00007ff4cf2f1000], sp=0x00007ff4cf2ef4e0, free space=2045k  
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)  
`

---

<div class="post-metadata">

**Author:** ![gabe](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gabe](https://discuss.elastic.co/u/gabe)\
**Post date:** [March 5, 2016, 6:09pm UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/2 "2016-03-05T18:09:19Z")

</div>

Not sure if this worth trying to debug, only occurred once, restarted server and now the problem is that logstash starts and the stops.

---

<div class="post-metadata">

**Author:** ![michalterbert](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@michalterbert](https://discuss.elastic.co/u/michalterbert)\
**Post date:** [March 5, 2016, 11:20pm UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/3 "2016-03-05T23:20:26Z")

</div>

Run logstash with DEBUG=1 and please show results 😉

---

<div class="post-metadata">

**Author:** ![gabe](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gabe](https://discuss.elastic.co/u/gabe)\
**Post date:** [March 6, 2016, 10:18pm UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/4 "2016-03-06T22:18:35Z")

</div>

Not quite sure how to do that, be good if you help a specific example?

Looks like the issue has been solved across multiple servers

---

<div class="post-metadata">

**Author:** ![michalterbert](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@michalterbert](https://discuss.elastic.co/u/michalterbert)\
**Post date:** [March 7, 2016, 7:09pm UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/5 "2016-03-07T19:09:32Z")

</div>

yes, please run your logstash like example:

DEBUG=1 /opt/logstash/bin/logstash -f config.cfg --verbose

and show your results 🙂

---

<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:** [July 6, 2017, 5:08am UTC](https://discuss.elastic.co/t/insufficient-memory-openjdk-64-bit-server-vm-warning/43567/6 "2017-07-06T05:08:08Z")

</div>


