One must do the following
- set the min and max runtimes to 1
- go into config/environments/production.rb and uncomment the
#config.threadsafe!
line, you must also do this for any other environments you would want threadsafe mode to work in.
By doing these things Rails will run using one runtime and multiple threads saving you lots of memory. Additional information regarding threadsafe jruby on rails apps can be found here http://nowhereman.github.com/how-to/rails_thread_safe/
If you are using Warbler, you can skip step one - if you only follow step#2 the min and max runtimes will be set by default look at the web.xml within the war file you will see that it has been set. Likewise, if threadsafe has not been set you will see the absence of the min and max settings.
That being said Rails 4 will have threadsafe enabled by default. Here's the commit https://github.com/rails/rails/pull/6685
Also, here's a post about the hows and whys: http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html