Warm tip: This article is reproduced from serverfault.com, please click

Tomcat9 does not respond

发布于 2021-06-22 15:00:46

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?

Questioner
Thomas Lang
Viewed
0
Thomas Lang 2021-07-19 22:57:55

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.