The Keep-Alive-Thread is responsible for maintaining the KeepAliveCache
, that stores information about http connections that use the Keep-Alive
attribute. If you have at least one such connection, there will be a Keep-Alive-Thread watching them. When you close all keep-alive connections, this thread is destroyed. When you add a new keep-alive connection to the empty cache, JVM starts this thread again.
White color means that the thread is not alive anymore. As you can see, your JVM creates and destroys this thread constantly.
It seems that you are doing the same work manually with your timer tasks that track heartbeats. You close those keep-alive connections after 6 seconds and JVM destroys the Keep-Alive-Thread. You create a new connection and JVM starts a new watching Keep-Alive-Thread.
If you use the Keep-Alive
attribute on your http connections, it's better just set the correct timeout and let the JVM do the housekeeping work.