High CPU in ScheduledThreadPoolExecutors after they are shutdown

Solution Verified - Updated -

Issue

  • We're seeing high CPU in java and it looks like it is caused by ScheduledThreadPoolExecutor that has been shutdown.
  • JBoss is running EJB timers that show high CPU persisting in the following calls:
"EJB-Timer-1 [target=jboss.j2ee:ear=myapp.ear,jar=myapp.jar,name=MyEJB,service=EJB3]" prio=10 tid=0x00002aaac0141800 nid=0x3d7 runnable [0x00000000541cc000]
   java.lang.Thread.State: RUNNABLE
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.poll(ScheduledThreadPoolExecutor.java:602)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:943)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    at java.lang.Thread.run(Thread.java:662)

Environment

  • JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content