java - Azure WebApp - Tomcat 关闭

标签 java tomcat azure web-applications azure-web-app-service

我有一些 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/

相关文章:

java - 从类方法内访问类属性 - Java

java - 获取 JVM 中加载的所有 ServletContext(servlet 容器)

python - 从 python sdk 获取 Azure VM 的备份详细信息

Java 弃用 API 和 SuppressWarnings "deprecation"- 实用方法

java - [PlayFramework 2.5][Java] JSON post 请求绑定(bind)到表单中

java - Android,实时振幅和音调检测

azure - CosmosDB 具有有限过时一致性的单区域数据库/帐户中的 K 和 T 是什么意思?

Tomcat 7 忽略了 logging.properties

javascript - Java Servlet 在无限循环中写入图像

javascript - Azure Functions 重定向 header