Spring Boot with embedded Tomcat uses loads of CPU after startup

850 views Asked by At

I have a Spring Boot application that works with an embedded Tomcat web server. The application uses a H2 db over JPA. The front end is a single page application that communicates over a REST interface with the Spring back end, that only contains a Business layer and a Domain layer. Nothing complex.

As the application is a prototype for a future product that will run on a minimalistic system, therefore I was measuring the CPU load and memory usage. That's when I found an odd behaviour, which I currently cannot explain.

During the start up, the app uses about 3/4 of the CPU which is okay as the whole framework gets initialized. But after the app has started (Log message "Started Application in XX seconds" has appeared) it still uses about 50% of the CPU, slowly decreasing until it finally reaches 15% after about 2 or 3 minutes, although my implementation is not doing anything active. It's pretty much only waiting for a request over the REST interface.

It appears to me that Spring or the embedded Tomcat is doing something, which I don't know of. Has anybody already experienced the same issue and/or maybe knows what could be going on?

0

There are 0 answers