I have a Java web application (1.8) running in a Tomcat. The application logs to a log file, including the thread-ID: 06/30 11:30:51 (101970) [userInfo Jun 30 11:30:51 CEST 2022] INFO some.class.name [] - Some Log Message
I recently noticed that the Thread-Id has become very large (1600000 +) and wonder if that indicates a problem with the Threadpooling (i.e. threads not being returned to the pool).
According to the Thread class, the ID should be a unique number that is increasing (and might be reused). I assumed that this means that the ID should increase only if a new additional Thread had to be created.
However, I am currently monitoring the Thread counts (via ThreadMXBean) and see that the thread-id-number is much higher than the Peak Thread Count.
Does anyone have insights of how the thread-id is created and if there is any correlation between a high thread id and the number of threads?