1

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
brad
  • 31,987
  • 28
  • 102
  • 155

1 Answers1

0

This seems to be a limitation of JRuby's shell launcher. The good news that the native JRuby launcher handles that properly, you could install it via:

jruby -S gem install jruby-launcher

P.S. In case you see such problems, feel free to file bugs against JRuby: http://bugs.jruby.org

  • Actually I did: Forgot to update here, thx for the reminder: http://jira.codehaus.org/browse/JRUBY-4702 Does installing jruby-launcher overwrite the original jruby command? or does it provide another executable? – brad Apr 13 '10 at 20:38
  • When you install the native JRuby launcher (on *nix), it overwrites 'jruby' file, but the old shell-based launcher is available via jruby.sh. – Vladimir Sizikov Apr 21 '10 at 09:59