Support Article

Agent PegaMKT-Engine SendEmailsInBulk hanging

SA-29384

Summary



During testing user is generating 202636 emails from a Pega Marketing Campaign, after sending 11030 emails the SendEmailsInBulk agent is failing to complete and no further emails are sent.

Error Messages



Not Applicable


Steps to Reproduce

  1. In the batch topology set thread count >1 for all the nodes that runs SendEmailsInBulk agent.
  2. Create a campaign which generates a large number of emails.


Root Cause



A defect or configuration issue in the operating environment.

It was identified that the execution is stuck on the waitOnBatchActivity function. It was also observed that if 10 calls to queueBatchActivity made, only 9 got started and finished, the 10th invocation didn't occurred.
Pega Marketing email transmission functionality uses queueBatchActivity and waitOnBatchActivity functions in an activity to send emails in parallel execution.

The activity is invoked from SendEmailsInBulk agent.

The number of parallel execution is dependent of thread count value set in the Decisioning Batch topology landing page.

On an Enterprise application server (JBOSS) this is done using PRAsync mdb. JBoss uses HornetQ as messaging infrastructure and we suspected the messages are getting lost if the agent takes long time to complete.

Resolution



Perform the following local-change: Update JBOSS configuration ‘standalone-full.xml’ to disable buffering at client's portal

1. Set “consumer-window-size” to 0. refer https://docs.jboss.org/jbossmessaging/docs/usermanual-2.0.0.beta1/html/flow-control.html
To allow slow consumers, set the consumer-window-size to 0 (for no buffer at all). This will prevent the slow consumer from buffering any messages on the client side. Messages will remain on the server side ready to be consumed by other consumers.

<pooled-connection-factory name="hornetq-ra">
<transaction mode="xa"/>
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/JmsXA"/>
</entries>
<consumer-window-size>0</consumer-window-size>
</pooled-connection-factory>

2. Set “max-delivery-attempts” to 1

<address-setting match="#">
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes>
<page-size-bytes>2097152</page-size-bytes>
<address-full-policy>PAGE</address-full-policy>
<max-delivery-attempts>1</max-delivery-attempts>
<message-counter-history-day-limit>10</message-counter-history-day-limit>
</address-setting>​

Published October 20, 2016 - Updated August 23, 2017

Have a question? Get answers now.

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