[jruby-user] Anything wrong with shelling out to jruby?

John Joseph Bachir <[email protected]> Mon, 16 Mar 2015 18:45:12 -0400
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CAOf2Z5upNDgD_-JTsRhvdHW=HavuNCNL_T0_0Fj1LJ+FNdg5ng@mail.gmail.com>
I have an application where I would like to shell out to jruby. A very
simple script that essentially does this a dozen times serially:

begin
  `rails runner scripts/foo.rb`
rescue
  # .. report error
end

I remember hearing about problems invoking jruby from jruby. Some initial
basic tests in my dev environment don't show any problems.

My guess at what the problem is: if jruby is configured to take an
application's worth of RAM (say 512M), then the small out script will take
that and then each individual sub process will take that as well.

I wonder if in practice this won't matter much, because the OS will move
most of the outer instance's memory into VM and just keep it there?

Thanks for any insights or pointers to other info about this!

John