I’m running a Rails application with Tomcat and I keep getting this
IOError in Admin/profilesController#update
Cannot run program “/bin/sh” (in directory
error=12, Cannot allocate memory
It doesn’t happen all the time, but keeps coming back if the app has
running for some time. I run Tomcat with the following options:
-Xms384M -XX:MaxPermSize=192M’. I tried to give it more memory but it
doesn’t help much. And when this happens there’s still a couple hundred
free memory on the system.
The app runs external tools on a regular basis (imagemagick (paperclip),
indexer (sphinx), new relic rpm) so its essential for me to get this
working. Are there any magical ways to let java run these programs?