Analysis of 90% threads in java.lang.Thread.State: WAITING (parking)

This is typical resource leak. You are using some sort of ExecutorService somewhere in your application and you are not closing that pool after work is done causing threads to await forever.

You should call ExecutorService#shutdown() to close pool and release/terminate its threads after work is done.

Threads names like pool-282-thread-1 pool-283-thread-1 suggests that you are most probably using single thread pool executor (because pool no. is large and thread no. is only 1). The idea behind ExecutorService is to reuse threads that are idle to do some more work. So insteed of createing new ExecutorService each time you need to do some background work, you should rather share single instance and use it in your application.

Leave a Comment