Out of memory with confusing JVM suggestion message

Hi All,

We have been getting an “Out of Memory Error” on one of our servers
recently so we increased the heap size from 1.5Gb to 3Gb but it is still
occurring and then I noticed in the “hs_err_pidXXXXX.log” file it creates
when it occurs that it has suggestions at the top of things to try and one
of them is “Decrease Java heap size (-Xmx/-Xms)”.

I​’m now confused as how would “decreasing” it help?

​In the “catalina.out” file it has the following for the error:

​OpenJDK 64-Bit Server VM warning: INFO:

os::commit_memory(0x00007f6feb746000, 12288, 0) failed; error=‘Cannot
allocate memory’ (errno=12)

There is insufficient memory for the Java Runtime Environment to

continue.

Native memory allocation (mmap) failed to map 12288 bytes for committing

reserved memory.
OpenJDK 64-Bit Server VM warning: OpenJDK 64-Bit Server VM warning: INFO:
os::commit_memory(0x00007f6feaf3e000, 12288, 0) failed; error=‘Cannot
allocate memory’ (errno=12)
INFO: os::commit_memory(0x00007f6fd6c37000, 12288, 0) failed;
error=‘Cannot allocate memory’ (errno=12)

Our environment is AWS Linux (kernel 3.14), Java 1.8.0.65, Tomcat 7.0.65
and Lucee 4.5 and the server has 4Gb memory and a 2Gb swap.

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org

I think it’s suggesting you reduce the amount of memory you are allocating
to the heap because the JVM is having trouble getting the requested amount
from the OS.
Can you see what other processes might be consuming memory at the point the
error happens ?

something like NewRelic’s server monitoring might be useful to show you
memory profile of other processesOn Thu, 17 Dec 2015 at 12:25 Andrew Dixon <@Andrew_Dixon> wrote:

Hi All,

We have been getting an “Out of Memory Error” on one of our servers
recently so we increased the heap size from 1.5Gb to 3Gb but it is still
occurring and then I noticed in the “hs_err_pidXXXXX.log” file it creates
when it occurs that it has suggestions at the top of things to try and one
of them is “Decrease Java heap size (-Xmx/-Xms)”.

I​’m now confused as how would “decreasing” it help?

​In the “catalina.out” file it has the following for the error:

​OpenJDK 64-Bit Server VM warning: INFO:

os::commit_memory(0x00007f6feb746000, 12288, 0) failed; error=‘Cannot
allocate memory’ (errno=12)

There is insufficient memory for the Java Runtime Environment to

continue.

Native memory allocation (mmap) failed to map 12288 bytes for

committing reserved memory.
OpenJDK 64-Bit Server VM warning: OpenJDK 64-Bit Server VM warning: INFO:
os::commit_memory(0x00007f6feaf3e000, 12288, 0) failed; error=‘Cannot
allocate memory’ (errno=12)
INFO: os::commit_memory(0x00007f6fd6c37000, 12288, 0) failed;
error=‘Cannot allocate memory’ (errno=12)

Our environment is AWS Linux (kernel 3.14), Java 1.8.0.65, Tomcat 7.0.65
and Lucee 4.5 and the server has 4Gb memory and a 2Gb swap.

Kind regards,

Andrew
about.me http://about.me/andrew_dixon - mso http://www.mso.net - Lucee
Association Member http://lucee.org


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUBfc7wGrcKoAXVfzz15XD8CdebDqkAQdaPd2cA5Zqhww%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUBfc7wGrcKoAXVfzz15XD8CdebDqkAQdaPd2cA5Zqhww%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.