Netty Cleanup Spring Boot Tomcat WAR
00:10 07 Oct 2025

We deploy Spring Boot apps onto a dedicated Tomcat via WAR File.

In our Tomcat logs (on shutdown) we regularly see messages like This is very likely to create a memory leak followed by some io.netty.util.internal.InternalThreadLocalMap ThreadLocal links.

We use Spring's WebClient which itself relies on some Netty stuff.

So my questions are:

  1. Can I ignore the Tomcat messages in the log as some say Netty is a matured library (and therefore does some serious cleanups itself under the hood) and the log level is just WARN?

  2. How do I cleanup the Netty connections when Tomcat shuts down and triggers the Spring Boot shutdown process?

spring-boot tomcat netty