I have a springboot application right now that the threads keeps on increasing even if the server is idle. This causes the machine to crash over time. Causing very high memory and CPU usage.
I tried setting server.tomcat.max-threads=5 but I am very unlucky and the threads keeps on rising.
By the way, these are my components: - Rest Template - OK HTTP - Hikari CP - Springboot and Spring Framework (@RestController and @Service) - HttpInterceptor (Request and Outgoing) - Hibernate / JPA
I am also counting the threads using htop and the JNI I have created. The JNI PID/TID can get htop's light-weight-process IDs. So this JNI can virtually map that LWPID and the java thread.
Any help will be much appreciated.
Thanks,
Artanis Zeratul