English 中文(简体)
JRuby Error: Your application used more memory than the safety cap of 500m
原标题:
  • 时间:2009-11-18 19:17:55
  •  标签:
  • jvm
  • jruby

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?

最佳回答

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.

问题回答

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

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





相关问题
what do these ruby warnings mean?

cqq.rb:96 **warning: Statement not reached.** /root/newpackage/lib.rb:727 **warning: instance variable @object not initialized** Error: Your application used more memory than the safety cap of 500m. ...

How to register a JDBC driver using jruby-complete.jar?

I m trying to write a script that is executed with the jruby-complete.jar like so: java -cp derby.jar; -Djdbc.drivers=org.apache.derby.jdbc.EmbeddedDriver -jar jruby-complete.jar -S my_script.rb I m ...

How do I unmarshal a ruby object in java?

I have a an object that I d like to grab the contents of in java. The only problem is that is is currently in ruby. irb(main):050:0> blah => "...

What s the difference between Ruby and JRuby? [closed]

Can anyone please provide me in layman s terms the difference between developing a JRuby and a Ruby, Rails application? I use NetBeans as my Ruby on Rails IDE and every-time I create a project is ...

Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

热门标签