Can I auto restart tomcat jvm on out of memory exception

后端 未结 7 1638
北海茫月
北海茫月 2021-01-31 05:12

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

相关标签:
7条回答
  • 2021-01-31 05:45

    not easily, and definitely not through the JVM that just suffered the out of memory exception. Your best bet would be some combination of tomcat status monitor coupled with cron scripts or related scheduled system administrator scripts; something to check the status of the server and automatically stop and restart the service if it has failed.

    0 讨论(0)
提交回复
热议问题