no proper shutdown of spring boot app on a linux tomcat service
0
votes
0
answers
58
views
I have following envirnonment Spring boot (3.1.1) web app, running on tomcat 10.x as a systemd service, on RHEL9.
It uses a ehcache, configured to be persistent across restarts.
If I start & stop tomcat manually per
./startup
and ./shutdown
, I can see a
DEBUG o.e.c.EhcacheManager - Close successful.
in my log. That means, the cache is closed properly, and the cache is still valid after restart.
On starting & stopping tomcat per service I miss that log entry, and indeed the caches are not properly closed and renewed after restart.
[Service]
...
ExecStart=/opt/xxx/apache-tomcat/bin/catalina.sh run
ExecStop=/opt/xxx/apache-tomcat/bin/shutdown.sh
These are the same scripts I run manually.
Something I am not understanding is happening in this shutdown phase.
Is the service stop running into a timeout and than forcing a ungracefull tomcat stop?
###### Actions taken:
Log level for EHCachemanger set started/stopped manually and per service
Asked by Steffen Spranger
Nov 6, 2024, 08:32 AM
Last activity: Jun 24, 2025, 03:38 PM
Last activity: Jun 24, 2025, 03:38 PM