https://stackoverflow.com/questions/7405046/can-i-auto-restart-tomcat-jvm-on-out-of-memory-exception
Can I auto restart tomcat jvm on out of memory exception
I know that this is not "best practice" but I would like to know if I can auto restart tomcat if my deployed app throws an outofmemory exception
stackoverflow.com
-XX:OnOutOfMemoryError="/yourscripts/tomcat-restart"
를 하면 된다고 함