JRuby Error: Your application used more memory tha

2020-05-06 14:36发布

I was running a JRuby something.rb script and suddenly it throws this:

Error: Your application used more memory than the safety cap of 500m.
Specify -J-Xmx####m to increase it (#### = cap size in MB).
Specify -w for full OutOfMemoryError stack trace

What caused this and how do I fix it?

标签: jvm jruby
3条回答
The star\"
2楼-- · 2020-05-06 14:52

That would be -J-Xmx900m, which is basically just passing the -Xmx flag to the underlying JVM.

查看更多
The star\"
3楼-- · 2020-05-06 15:03

you need to run like jruby -J-Xm900m abc.rb

查看更多
贪生不怕死
4楼-- · 2020-05-06 15:07

You are running out of memory (heap) reserved for Java virtual machine. Try to increase it in server startup with command line parameters or configuration files.

Something like this:

server_start_command -J-Xm900m

Or fix your ruby script to use less heap memory.

查看更多
登录 后发表回答