Friday, October 2, 2015

Transaction timeout for BPEL on SOA 11g

ISSUE:

SOA server run time issue due to BPEL timeout exception.

ERROR OBSERVED:

Logs : @$DOMAIN_HOME/servers/soa_server/logs/soa_server.out

<<
The transaction was rolled back
or
Transaction Rolledback.: weblogic.transaction.internal.TimedOutException: Transaction timed out


<failed to handle message
weblogic.transaction.internal.TimedOutException: Transaction timed out after 511 seconds
BEA1-3FC3194262218127C3EA
>>

SOLUTION:

The timeouts should be configured based on the below condition

SyncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout


Note: This recommendation are ONLY applicable to Sync Processes. Additionally the default Timeout setting that comes with SOA 11g installation does not comply with this rule. You might need to adjust the setting according to your particular business needs.


1 SyncMaxWaitTime:

This property controls the maximum time the process result receiver will wait for a result before returning for Sync processes.

Step 1) Login to EM console with administrative account.

Step 2) Expand SOA and right click on “soa-infra”.

Step 3) From context menu, select SOA Administration –> BPEL properties.

Step 4) Click on “More BPEL Configuration properties"

Step 5) Enter the appropriate value for the SyncMaxWaitTime.
Current : 45
New : 300

 2 Transaction Time-out for BPEL EJB’s:

The timeout properties for the EJBs control the particular timeout setting for the SOA application, overriding the global setting specified by the JTA timeout
The following EJB’s need to be configured for transaction time outs.
  • BPELActivityManagerBean
  • BPELDeliveryBean
  • BPELDispatcherBean
  • BPELEngineBean
  • BPELFinderBean
  • BPELInstanceManagerBean
  • BPELProcessManagerBean
  • BPELSensorValuesBean
  • BPELServerManagerBean

Steps to change time out for above beans:

Step 1) Login to Weblogic Administration Console.

Step 2) Shutdown SOA server

Step 3) Click Lock & Edit

Step 4) Click on Deployments.

Step 5) Expand soa-infra –> EJB’s

Step 6) Click on EJB for which you want to change the timeout.(We need to change for all above mentioned EJB's)

Step 7) Click on Configuration.

Step 8) Change value for field “Transaction Timeout
Current : 500
New : 900

Step 9) Click Save.

Step 10) Click Activate Changes.

Step 11) Take backup of tmp and cache directory @ $MW_HOME/user_projects/domain/$DOMAIN_NAME/servers/soa_server
mv tmp tmp_BKP
mv cache_cache_BKP
mv data data_BKP

Step 12) Start SOA Managed Server (Upon startup above folders will be automatically created)

3 Global Transaction Timeout:

This property is timeout in seconds for active transactions. After this time, if the transaction is still “Active”, then it gets rolled back.

Steps to change JTA value follow below steps:

Step 1) Login to Weblogic Administration Console.

Step 2) Click Lock & Edit

Step 3) Expand “Services” –> Click on “JTA”

Step 4) Change value for field “Timeout Seconds”
Current : 30
New : 5000

Note :

1) In our environment timeout errors were observed @511 sec so we increased timeout for BPEL EJB's from 500 to some higher value.
2) While increasing timeout please follow below golden rule
    SyncMaxWaitTime < BPEL EJB's transaction timeout < Global Transaction Timeout 
3) Above value worked for our environment. In case of any confusion please raise SR with oracle as increasing it to random value will highly impact server performance.

Ref:

Troubleshooting BPEL Timeout Errors (Transaction rolled back / Transaction timed out / BPEL timed out) (Doc ID 1358900.1)

No comments:

Post a Comment

Other Posts