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

Delay in processing emails sent to email listener

SA-12323

Summary



There was a delay reported while processing emails using EmailListener, the emails were sent around 11:49 PM BST and were received by PRPC at 12:19 PM BST. It occurred only in production environment. This is a sporadic issue.

User found thread dump generated in the logs during this time.


Error Messages



2015-07-02 06:52:14,921 [      TP-Processor63] [          ] [                    ] (ngineinterface.service.HttpAPI) ERROR |: com.pega.pegarules.pub.context.RequestorLockException
com.pega.pegarules.pub.context.RequestorLockException: Unable to synchronize on requestor H3593152FFEA5AFE6DDDBF5398CAE861A within 120 seconds: (thisThread = TP-Processor63) (originally locked by = TP-Processor59) (finally locked by = TP-Processor59)
                at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:934)
                at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:730)
                at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:333)
                at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:667)
                at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
                at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:266)
                at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:243)
                at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:280)
                at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:225)
                at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:343)
                at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:236)
                at sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)

 
TP-Processor59:
 
Thread[TP-Processor59,5,main]
                java.lang.Object.wait(Native Method)
                at com.sun.jndi.ldap.Connection.readReply(Connection.java:434)
                at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
                at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:192)
                at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694)
                at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
                at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
                at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
                at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
                at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
                at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
                at javax.naming.InitialContext.init(InitialContext.java:223)
                at javax.naming.InitialContext.<init>(InitialContext.java:197)
                at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
                at com.pegarules.generated.activity.ra_action_searchldap_bff3b62d072d917f5482279157690850.step1_circum0(ra_action_searchldap_bff3b62d072d917f5482279157690850.java:198)
                at com.pegarules.generated.activity.ra_action_searchldap_bff3b62d072d917f5482279157690850.perform(ra_action_searchldap_bff3b62d072d917f5482279157690850.java:70)
                at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3502)
                at com.pegarules.generated.activity.ra_action_getldapsearchresults_e77c49019f660a57940debf85c0aff1a.step11_circum0(ra_action_getldapsearchresults_e77c49019f660a57940debf85c0aff1a.java:1108)
                at com.pegarules.generated.activity.ra_action_getldapsearchresults_e77c49019f660a57940debf85c0aff1a.perform(ra_action_getldapsearchresults_e77c49019f660a57940debf85c0aff1a.java:306)
                at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3502)
                at com.pegarules.generated.activity.ra_action_getclientdata_d40046c9af3ddec625fefdb48c2a33a4.step2_circum0(ra_action_getclientdata_d40046c9af3ddec625fefdb48c2a33a4.java:295)
                at com.pegarules.generated.activity.ra_action_getclientdata_d40046c9af3ddec625fefdb48c2a33a4.perform(ra_action_getclientdata_d40046c9af3ddec625fefdb48c2a33a4.java:90)
                at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3502)
                at com.pegarules.generated.activity.ra_action_acdatasource_driver_9425425adc8cc75364b7b7b1bb91e6eb.step1_circum0(ra_action_acdatasource_driver_9425425adc8cc75364b7b7b1bb91e6eb.java:281)
                at com.pegarules.generated.activity.ra_action_acdatasource_driver_9425425adc8cc75364b7b7b1bb91e6eb.perform(ra_action_acdatasource_driver_9425425adc8cc75364b7b7b1bb91e6eb.java:70)
                at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3502)
                at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:620)
               .
               .
               .
                at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
                at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
                at java.lang.Thread.run(Thread.java:662)


Root Cause



The root cause of this problem is defect/misconfiguration in the operating environment.
From the  thread dump in the error sections, Thread-63 is locked by Thread-59.

2015-07-02 07:29:42,868 [      TP-Processor59] [TABTHREAD1] [sueTracking:01.01.01] (  searchLDAP.LDAPSearch.Action) ERROR | GMYLES - :389; socket closed
2015-07-02 07:30:15,925 [  EMAIL-Thread-63694] [  STANDARD] [sueTracking:01.01.01] (  searchLDAP.LDAPSearch.Action) ERROR EMAIL.SDSEmailListener.SDSEmailServer|from()|sub(Brand new )|Email|SDSEmailSP|RBC-CM-SDSISSUETRACKING-WORK-ISSUE|CreateSDSWorkItem|AA5C892935EE2825E30925434FF2585D2 SDSServiceOperator - :389; socket closed

 
As you can see from the top of the call stack, the thread is waiting for a reply from your external Sun JNDI LDAP server after having issued an authenticate request. This is the root cause of the EmailListener thread which was stuck/hung which led to the connection to the EmailServer’s mailbox to be closed.


Resolution



This issue is resolved by making the following change to the operating environment:

Perform LDAP timeout changes and the EmailListeners work fine.
Suggest Edit

Published July 23, 2015 - 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