Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

ERROR - Trying to use a recycled thread

SA-69304

Summary



StaleThreadError occurs multiple times a day on the Production server. However, this does not impact the application.


Error Messages



com.pega.pegarules.pub.context.StaleThreadError
[egaRULES UsageDaemon] [STANDARD] [ ] [ ] (mgmt.base.ThreadData) ERROR   - Trying to use a recycled thread;com.pega.pegarules.pub.context.StaleThreadError: Thread has been recycled;    
at com.pega.pegarules.session.internal.mgmt.base.ThreadData.validateUse(ThreadData.java:817) ~[prprivate.jar:?];    
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.validateUse(PRThreadImpl.java:186) ~[prprivate.jar:?];    
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.getStreamChangeTrackerMap(PRThreadImpl.java:1931) ~[prprivate.jar:?];    
at com.pega.pegarules.session.internal.mgmt.autostreams.StreamChangeTracker.trackChangeForAjaxDrift(StreamChangeTracker.java:507) ~[prprivate.jar:?];    
at com.pega.pegarules.session.internal.PRSessionProviderImpl.trackChangeForAjaxDrift(PRSessionProviderImpl.java:2148) ~[prprivate.jar:?];    
at com.pega.pegarules.data.internal.clipboard.ClipboardPropertyBase.trackAddOrDeleteForAJAXStreams(ClipboardPropertyBase.java:4180) ~[prprivate.jar:?];    
at com.pega.pegarules.data.internal.clipboard.ClipboardPageBase.trackChangeForAJAXStreams(ClipboardPageBase.java:2617) ~[prprivate.jar:?];    
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.put(ClipboardPageImpl.java:2255) ~[prprivate.jar:?];



Steps to Reproduce



Not Applicable


Root Cause



In the logs, the pushmemoryusage activity was traced each time the Stale Thread exception occurred.
    com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:274) ~[prprivate.jar:?]     at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:251) ~[prprivate.jar:?]
    at com.pega.pegarules.management.internal.MBeanHelper.invokeOperation(MBeanHelper.java:77) ~[prprivate.jar:?]
    at com.pega.pegarules.management.internal.MemoryManagement.MemoryStatus(MemoryManagement.java:62) ~[prprivate.jar:?]
    at sun.reflect.GeneratedMethodAccessor271.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) ~[?:1.8.0_131]
    at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) ~[?:1.8.0_131]
    at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1252) ~[?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[?:1.8.0_131]
    at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1246) ~[?:1.8.0_131]
    at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1085) ~[?:1.8.0_131]
    at com.pega.pegarules.priv.management.PegaModelMBean.invoke(PegaModelMBean.java:121) ~[prpublic.jar:?]
    at com.pega.pegarules.priv.management.MBeanManagement.executeMBeanOperation(MBeanManagement.java:246) ~[prpublic.jar:?]
    at com.pega.pegarules.priv.management.MBeanManagement.executeMBeanOperation(MBeanManagement.java:134) ~[prpublic.jar:?]    at com.pegarules.generated.activity.ra_action_pushmemoryusage_22fb89b93a5e9a5a51f36a4a16dd9ef8.step4_circum0(ra_action_pushmemoryusage_22fb89b93a5e9a5a51f36a4a16dd9ef8.java:471) ~[?:?]
    at com.pegarules.generated.activity.ra_action_pushmemoryusage_22fb89b93a5e9a5a51f36a4a16dd9ef8.perform(ra_action_pushmemoryusage_22fb89b93a5e9a5a51f36a4a16dd9ef8.java:122) ~[?:?]



Resolution



Here’s the explanation for the reported behavior:

PushMemoryUsage is an Autonomic Event Services (AES) agent that provides Pega Predictive Diagnostic Cloud (PDC) with the overall health of all the nodes in a cluster. This is then displayed in the PDC landing page.


 
Suggest Edit

Published December 12, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us