tomcat - Tomcat9 does not respond
问题描述
We have a strange issue since upgrading from tomcat8 to tomcat9.
- From time to time tomcat9 does not respond anymore.
- All deployed war applications are not reachable anymore.
- That being said the apache proxy server seems to be ok.
- Only restarting the tomcat9 service helps.
There are no helpful log entries in catalina.out or other app log files.
Our very only suspicion is that it occurs mainly when hot deploying war files (moving war files to the apps folder without stopping/starting tomcat9). In contrast - hot deploying was never a problem on tomcat8.
Maybe this is an ajp issue? Here is our connector config:
<Connector
port="8009"
protocol="org.apache.coyote.ajp.AjpNio2Protocol"
acceptCount="200"
acceptorThreadCount="2"
address="0.0.0.0"
connectionTimeout="1800000"
maxThreads="400"
minSpareThreads="20"
secretRequired="false"
redirectPort="8443" />
I found some (maybe) related issue here: tomcat hangs when deploying war file and restarting server
The folks over there state that they stop the tomcat, deploy the war, then start the tomcat again.
Anyone with the same issue since upgrading to tomcat9?
解决方案
So it seems that the hot deployment on tomcat9 is somehow causing the freeze. The last three deployments were done like the following:
- stop tomcat9 service
- move war files
- delete the extracted folder
- adjust file settings (tomcat user)
- start tomcat9 service
Up to now we faced no more freezes.
So i suggest that hot deployment on tomcat9 (maybe in conjunction with java11 being also updated) causes freezes.
This solution is working for us.
推荐阅读
- python - Gensim 训练 word2vec 和 Fasttext
- scala - 使用超类型过滤 HList
- java - Java字符串分隔数列
- java - teiid importer.schemaPattern 属性不起作用
- html - data-val-regex-pattern 无法否定某些特定字符
- java - 如何为可选流中的列表映射索引 0 处的值
- datetime - Flutter 日期时间解析
- java - 我如何知道哪些第三方依赖项在本机模式下与 Quarkus 兼容?
- sql - SQL/ORACLE 查询练习 18c
- node.js - Express + PassportJS 无法读取 flash 消息