Why do I see 'Cannot allocate memory' errors when running Java?

Solution Unverified - Updated -

Issue

  • Why do I see Cannot allocate memory errors when running java?
$ java -version
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f487d000000, 4194304, 2097152, 1) failed; error='Cannot allocate memory' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000b9c00000, 20971520, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cdc00000, 41943040, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f5a00000, 23068672, 2097152, 0) failed; error='Cannot allocate memory' (errno=12)
java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.4.1.el6_5-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Environment

  • Red Hat Enterprise Linux 6.
  • java-1.7.0-openjdk version 1.7.0.45-2.4.3.2.el6_4 or later.
  • Static (classical) huge pages enabled.
  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content