I have a Tomcat server that serves many webapps, each with many servlets. Sometimes, a single servlet of a single webapp runs out of memory, and then the entire Tomcat crashes with a Java "Out of Memory" error, and I have to restart it.
Is there a way to isolate the servlet, so that when it runs of of memory, it does not crash all other apps?
I currently run Tomcat 7 on Windows, but I may soon move to Linux, so answers for both platforms are welcome.