I’m running a Rails application with Tomcat and I keep getting this
error:
IOError in Admin/profilesController#update
Cannot run program “/bin/sh” (in directory
“/opt/apache-tomcat-6.0.18/webapps/ROOT/WEB-INF”): java.io.IOException:
error=12, Cannot allocate memory
It doesn’t happen all the time, but keeps coming back if the app has
been
running for some time. I run Tomcat with the following options:
‘-Xmx384M
-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
MB
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?
LacKac