mercredi 4 mars 2015

Web server under Java 8 using 400% CPU

We are running a Java server using Spring and Jersey. In our local environment we are running the server through Maven using Jetty, while in production it is running in a tomcat container deployed as a war file.


The problem only which occurs in our local dev environment, is that over time (1-2 hours) the process starts using an extreme amount of CPU, regularly running at over 400%. This happens whether the server is actively queried or not, and both when running in debug mode or not. The server is started from inside IntelliJ.


The time it takes to start showing the problem indicated to me that it might be a memory problem, but the memory usage doesn't increase much.


Sampling the Java process which is eating the CPU, shows a lot of paused threads, but not really a lot of running threads.


We have two recent changes that I feel could have resulted in this problem



  1. Updated to Java 8 - the problem shows up with all versions of the Oracle JDK 1.8 we have tried

  2. Migrated from MySQL to PostgreSQL


At this point I'm stumped and was hoping someone else had run into this problem? If so, what have you done to solve and/or debug it?


Aucun commentaire:

Enregistrer un commentaire