Error occurred during initialization of VM, Could not reserve enough space for object heap

$ jgem install rack-mount -v=0.6

Error occurred during initialization of VM
Could not reserve enough space for object heap

While trying to intall Rails dependent gems… Looks like something has
taken
up huge memory.

Can somebody explain what is this and how to avoid this issue?

Hi Anil,

Which JRuby version do you use? I just tried on my end and I see that
the latest jruby won’t consume more than 100mb of heap.
By default, JRuby limits the heap by 512mb, but one can adjust it via

jruby -J-Xmx512m …

Just try different numbers. Maybe your system is low on memory? Then
try to reduce the heap parameter. But typically, if you see such
problems, you’d need to increase the heap.

Thanks,
–Vladimir

On Sat, Apr 3, 2010 at 11:31 AM, Anil W. [email protected]
wrote:

$ jgem install rack-mount -v=0.6
Error occurred during initialization of VM
Could not reserve enough space for object heap
While trying to intall Rails dependent gems… Looks like something has taken
up huge memory.
Can somebody explain what is this and how to avoid this issue?

Anil


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi,
it’s the error from jvm before anything starts,
it’s complaining that there is no sufficient space to even start jvm.
I’m seeing this one often on my virtualized test box.
Summaryzing it’s problem with your computer at the specific moment,
lack of contignous ram space if i remember it correctly.
Anil try to see (top or prstat) how much of ram is accesible, not how
much memory.

Best greetings,
Paweł Wielgus.

2010/4/3 Vladimir S. [email protected]:

problems, you’d need to increase the heap.

Can somebody explain what is this and how to avoid this issue?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Sat, Apr 3, 2010 at 4:31 AM, Anil W. [email protected]
wrote:

$ jgem install rack-mount -v=0.6
Error occurred during initialization of VM
Could not reserve enough space for object heap
While trying to intall Rails dependent gems… Looks like something has taken
up huge memory.
Can somebody explain what is this and how to avoid this issue?

The JVM won’t start up if the -Xmx amount (512M by default in JRuby)
is more than available physical memory. You can tweak it as Vladimir
mentioned to get to get it to start up; generally it should’t need
that amount for most applications (we just set it to that so it has
room to grow when it does need it).

Is this on Windows? Non-Windows systems seem to be more giving about
virtual memory for the unused large heap, while Windows just refuses
to start it up.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs