我有一些 Azure Java WebApp。 “Newest Tomcat 8”是我们使用的应用程序容器。 我们的网络应用程序启用了“始终开启”选项。
每天tomcat正常关闭:
17-Dec-2015 07:07:32.867 INFO [Thread-114] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-127.0.0.1-1170"]
17-Dec-2015 07:07:32.976 INFO [Thread-114] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
当我们在应用程序中第一次访问tomcat时自动启动
17-Dec-2015 09:45:47.802 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 498942 ms
这种事每天都会发生。
还有人遇到过这个问题吗? 如何防止 tomcat 关闭?
提前致谢!
最佳答案
据我所知,这似乎不是Azure的问题。如果您为 Web 应用启用了选项Always On
,则当 Web 应用闲置一段时间后,Azure 不会卸载该 Web 应用。
以下是 Azure 官方文档 https://azure.microsoft.com/en-us/documentation/articles/web-sites-configure/ 中对选项 Always On
的说明.
Always On. By default, web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the app loaded all the time. If your app runs continuous web jobs, you should enable Always On, or the web jobs may not run reliably.
但是,该问题可能是由某些情况引起的,例如错误处理异常。
作为引用,有一个已回答的线程 ( Tomcat randomly shuts down with an AbstractProtocol pause after mild usage ) 解释了此问题。您可以尝试查看并检查您的问题。
如有任何疑问,请随时告诉我。
关于java - Azure WebApp - Tomcat 关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34338330/