How to set memory options for JRuby

I'm presently trying to debug a large web application and am running out of memory. Looking at the process arguments I see the max memory (Xmx) is set to 500mb, which isn't enough for my project.

I tried setting Xmx and Xms in "Ruby arguments" field in the "Run/Debug Configurations". The best I could get is "warning: -J-Xmx2048m argument ignored (launched in same VM?)". I also tried exporting JRUBY_OPTS and JVM_OPTS, but had no luck.

Anyone have a clue as to how to configure the project to pass memory options to JRuby or directly to the JVM?

1 comment

Thanks to JetBrains support for the help!

Apparently you need to specify the memory argument at the beginning of the Ruby Arguments. e.g. "-J-Xmx4096m -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)"


Please sign in to leave a comment.