Heroku Java Tomcat ServletContextListener不调用slugc上的contextDestroyed或重启

问题描述:

Heroku使用SIGTERM允许进程正常关闭。然而,Tomcat进程没有响应SIGTERM,并且从未在我的ServletContextListener上调用contextDestroyed。Heroku Java Tomcat ServletContextListener不调用slugc上的contextDestroyed或重启

如何让Tomcat调用使用Heroku重新启动的contextDestroyed,或者当Heroku为我的应用程序执行slug编译时。

你说得对。关闭挂钩未被注册以触发Tomcat的正常关闭,因此上下文未关闭关闭生命周期事件。最新版本的webapp-runner修复了这个问题:https://github.com/jsimone/webapp-runner/issues/22