Why does jruby complain about valid java_opts

Posted by brad on Stack Overflow See other posts from Stack Overflow or by brad
Published on 2010-03-17T14:50:58Z Indexed on 2010/04/13 11:52 UTC
Read the original article Hit count: 455

Filed under:
|
|
|

I have set my java min/max heap size to be the same as outlined in the Sun Docs for precise heap sizing using the following:

-Xms768m -Xmx768m

This works fine when I start tomcat, but if I run jruby from the command line it complains saying:

Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified

I read in the jruby docs about some -J-X params but it seems silly that I would need to explicitly override my normal jvm settings.

The problem arises when I do a deploy. I try running jruby -S rake db:migrate on my server and it complains.

Is it true that I need to explicitly override my JVM settings when running jruby? It seems as though ANY Xms/Xmx values cause jruby to complain.

Update So it seems that some settings do in fact work. For instance all of these work:

Xmx256m Xms256m
Xmx512m Xms256m
Xmx512m Xms500m

But these don't:

Xmx512m Xms512m
Xmx512m Xms501m
Xmx768m Xms512m

© Stack Overflow or respective owner

Related posts about java

Related posts about jruby