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

Repeated thread recycled exceptions cause StackOverFlow

SA-24813

Summary



Administrators observe "Thread has been recycled" error messages in the PegaRULES logfile. An associated stack trace indicates that the error is repeatedly looping. The "Thread has been recycled" error occurs hundreds of times in a few minutes before either stopping or resulting in a stackoverflow error.

Error Messages



com.pega.pegarules.pub.context.StaleThreadError: Thread has been recycled
    at com.pega.pegarules.session.internal.mgmt.base.ThreadData.validateUse(ThreadData.java:769)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.validateUse(PRThreadImpl.java:168)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.getRequestor(PRThreadImpl.java:335)
    at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:1832)
    at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:1713)
    at com.pega.pegarules.priv.LogHelper.doAlertException(LogHelper.java:1430)
    at com.pega.pegarules.priv.LogHelper.error(LogHelper.java:1355)
    at com.pega.pegarules.session.internal.mgmt.base.ThreadData.validateUse(ThreadData.java:771)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.validateUse(PRThreadImpl.java:168)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.getRequestor(PRThreadImpl.java:335)
    at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:1832)
    at com.pega.pegarules.priv.LogHelper.doAlert(LogHelper.java:1713)
    at com.pega.pegarules.priv.LogHelper.doAlertException(LogHelper.java:1430)
    at com.pega.pegarules.priv.LogHelper.error(LogHelper.java:1355)
    at com.pega.pegarules.session.internal.mgmt.base.ThreadData.validateUse(ThreadData.java:771)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.validateUse(PRThreadImpl.java:168)
    at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.getRequestor(PRThreadImpl.java:335)

(This error repeats)


Steps to Reproduce

Not Applicable and not reproducible on demand.  

Root Cause



The error loops repeatedly if the requestor that is generating an alert is tripping a stale requestor error or stale thread error.

Resolution



Apply HFix-28135 to address this issue. This hotfix adjusts the code so that it checks and avoids calling thread.getRequestor() in this situation.

Published June 27, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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