Reputation: 33605
I am using Tomcat 9.0.0.M22 with jdk1.8.0_131 on Windows Server 2012 R2 and I have a Spring Boot web application deployed on it, the issue is that every 10 seconds the commons daemon service runner spikes the cpu to 50% although my deployed web application is idle then decreases to 0% and this behavior continue to happen every 10 seconds.
In my application I don't have any job that runs every 10 seconds, and also when I run my web application on Tomcat from Eclipse I didn't notice the same behavior, so I am guessing that this is a Tomcat built in thread.
Upvotes: 5
Views: 3477
Reputation: 1
I was able to stop this behavior completely by setting reloadable="false" in context.xml.
Upvotes: 0
Reputation: 4775
With that much info it's pretty tough, couple of points you can think of:
Upvotes: 0
Reputation: 2181
Without more information this is just guessing but this could be the garbage collector trying to do it's job every ten seconds but not being able to evict any items because they are all still needed. You could try to increase the memory for Tomcat (-Xmx).
Upvotes: 0
Reputation: 2494
jdk/bin/jvisualvm
to connect to your tomcat and repeatedly press thread dump button on upper right of threads tab or if you prefer command line (e.g. via script), you can also use jdk/bin/jcmd <pid-of-your-tomcat> Thread.Print >> dumps.txt
Upvotes: 1