32
SAP NetWeaver How-To Guide Charu Goel How To... Investigate Timeouts In Synchronous XI/PI Scenarios Applicable Releases: SAP NetWeaver Process Integration 7.0 & 7.1x SAP NetWeaver Exchange Infrastructure 3.0 Topic Area: SOA Middleware Capability: Service Bus Version 1.0 July 2009

How to Investigate Timeouts in Synchronous XI PI Scenarios

Embed Size (px)

Citation preview

Page 1: How to Investigate Timeouts in Synchronous XI PI Scenarios

SAP NetWeaver How-To Guide Charu Goel

How To... Investigate Timeouts In Synchronous XI/PI Scenarios

Applicable Releases:

SAP NetWeaver Process Integration 7.0 & 7.1x

SAP NetWeaver Exchange Infrastructure 3.0

Topic Area:

SOA Middleware

Capability:

Service Bus

Version 1.0

July 2009

Page 2: How to Investigate Timeouts in Synchronous XI PI Scenarios

© Copyright 2009 SAP AG. All rights reserved.

No part of this publication may be reproduced or

transmitted in any form or for any purpose without the

express permission of SAP AG. The information contained

herein may be changed without prior notice.

Some software products marketed by SAP AG and its

distributors contain proprietary software components of

other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are

registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel

Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,

OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP,

Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,

i5/OS, POWER, POWER5, OpenPower and PowerPC are

trademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader

are either trademarks or registered trademarks of Adobe

Systems Incorporated in the United States and/or other

countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered

trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame,

WinFrame, VideoFrame, and MultiWin are trademarks or

registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or

registered trademarks of W3C®, World Wide Web

Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems,

Inc., used under license for technology invented and

implemented by Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP

NetWeaver, and other SAP products and services

mentioned herein as well as their respective logos are

trademarks or registered trademarks of SAP AG in

Germany and in several other countries all over the world.

All other product and service names mentioned are the

trademarks of their respective companies. Data contained

in this document serves informational purposes only.

National product specifications may vary.

These materials are subject to change without notice.

These materials are provided by SAP AG and its affiliated

companies ("SAP Group") for informational purposes only,

without representation or warranty of any kind, and SAP

Group shall not be liable for errors or omissions with

respect to the materials. The only warranties for SAP

Group products and services are those that are set forth in

the express warranty statements accompanying such

products and services, if any. Nothing herein should be

construed as constituting an additional warranty.

These materials are provided “as is” without a warranty of

any kind, either express or implied, including but not

limited to, the implied warranties of merchantability,

fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including

without limitation direct, special, indirect, or consequential

damages that may result from the use of these materials.

SAP does not warrant the accuracy or completeness of the

information, text, graphics, links or other items contained

within these materials. SAP has no control over the

information that you may access through the use of hot

links contained in these materials and does not endorse

your use of third party web pages nor provide any warranty

whatsoever relating to third party web pages.

SAP NetWeaver “How-to” Guides are intended to simplify

the product implementation. While specific product

features and procedures typically are explained in a

practical business context, it is not implied that those

features and procedures are the only approach in solving a

specific business problem using SAP NetWeaver. Should

you wish to receive additional information, clarification or

support, please refer to SAP Consulting.

Any software coding and/or code lines / strings (“Code”)

included in this documentation are only examples and are

not intended to be used in a productive system

environment. The Code is only intended better explain and

visualize the syntax and phrasing rules of certain coding.

SAP does not warrant the correctness and completeness of

the Code given herein, and SAP shall not be liable for

errors or damages caused by the usage of the Code, except

if such damages were caused by SAP intentionally or

grossly negligent.

Disclaimer

Some components of this product are based on Java™. Any

code change in these components may cause unpredictable

and severe malfunctions and is therefore expressively

prohibited, as is any decompilation of these components.

Any Java™ Source Code delivered with this product is only

to be used by SAP’s Support Services and may not be

modified or altered in any way.

Page 3: How to Investigate Timeouts in Synchronous XI PI Scenarios

Document History Document Version Description

1.00 First official release of this guide

Page 4: How to Investigate Timeouts in Synchronous XI PI Scenarios

Typographic Conventions Type Style Description

Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, graphic titles, and table titles

Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text>

Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

Icons Icon Description

Caution

Note or Important

Example

Recommendation or Tip

Page 5: How to Investigate Timeouts in Synchronous XI PI Scenarios

Table of Contents

1. Background Information ..................................................................................................... 1

2. Basic documentation .......................................................................................................... 2 2.1 Timeout Calling the Integration Server from the Adapter Framework .................. 3

2.1.1 ICM timeout for incoming HTTP calls (AF -> IS): ICM_HTTP_TIMEOUT ....... 3 2.1.2 Timeout due to insufficient available dialog work processes in Integration

Server ............................................................................................................... 6 2.2 Timeout Calling the Adapter Framework ................................................................. 7

2.2.1 ICM 402 timeout for http client calls (IS -> AF): ICM_HTTP_TIMEOUT ......... 7 2.2.2 HTTP 401 – Authentication failure ................................................................... 8 2.2.3 HTTP 500 – HTTP_RESP_STATUS_CODE_NOT_OK ................................ 10 2.2.4 HTTP Response Code 503: Service Unavailable .......................................... 12 2.2.5 Cluster communication timeout in Adapter Framework Core ........................ 13 2.2.6 Cluster timeout in Adapter Framework messaging system ........................... 13 2.2.7 Messaging System times out ......................................................................... 14 2.2.8 XI log showing HTTP CODE 110 ................................................................... 16

2.3 Timeout settings in specific adapters .................................................................... 17 2.3.1 Java SOAP Sender Adapter .......................................................................... 17 2.3.2 Java SOAP Receiver Adapter ....................................................................... 18 2.3.3 Java RFC Sender Adapter ............................................................................. 20 2.3.4 Java File adapter ........................................................................................... 21 2.3.5 Java JDBC adapter ........................................................................................ 23

2.4 Timeout with Sync/Async Bridge............................................................................ 25

3. Appendix ............................................................................................................................ 26

Page 6: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

1. Background Information In synchronous messaging scenarios running over PI, several communication segments are involved where each may lead to a time-out. Such a time-out on one communication segment causes the messaging scenario to fail as a whole.

This document highlights various timeouts that may occur during synchronous PI scenarios, and how an administrator can avoid them by configuring the relevant settings. As the concrete time-out periods depend on the scenario, this document does not provide concrete figures. It describes the solutions in a general way.

The picture below describes the complexity and possible timeout pitfalls of synchronous communication.

BPE

Sender

Adapter Engine

Integration Engine

Receiver

Mapping Runtime

1

2

3 4

12 11

9

8

10

7

6 5

July 2009 1

Page 7: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

July 2009 2

2. Basic documentation Given below is a brief description on the message flow between various components and the timeouts that may occur.

The similar concept is used throughout the document.

Consider an example of a SOAP scenario:

Here SOAP request message gets posted into the network layer. This message is sent to the Adapter framework where the AAE converts the SOAP message into the XI message and posts it to the Messaging System.

Messaging System which resides on the Java stack persists the message in the database and then sends the message to the Internet Communication Broker for further transmission.

ICM ensures that the communication between the SAP System (SAP Web Application Server) and the outside world via HTTP, HTTPS and SMTP protocols works properly.

Here the timeout might occur due to long processing in IS or due to some delays in receiver application which are depicted by the clock symbol. This may lead to a timeout in sender SOAP adapter as shown by the callout.

Note Considering the above example we will now focus on the different scenarios where the timeouts occur.

1

2

3

4

5 6 7

A delay could happen while processing in

IS or delays in receiver application

Timeout for synchronous

message delivery to the

Adapter

Web Server

Receiver

Page 8: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.1 Timeout Calling the Integration Server from the Adapter Framework

2.1.1 ICM timeout for incoming HTTP calls (AF -> IS): ICM_HTTP_TIMEOUT

HTTP timeout in ICM due to

ICM_HTTP_TIMEOUT reached!

Potential cause for the error: • Could be a large message size

• Processing taking long time on IE itself

• General system overload

July 2009 3

Page 9: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Proposed Solution: Set the timeout parameters in transaction smicm

• Goto transaction smicm -> services

• Now check the various port values

July 2009 4

Page 10: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Value for all ports: icm/keep_alive_timeout (default: 60 seconds)

Value for specific ports: icm/server_port_0 = PROT=HTTP, PORT=<icmhttpport>, TIMEOUT=30, PROCTIMEOUT=900

If PROCTIMEOUT is not set –> TIMEOUT is used

If TIMEOUT is also not set -> icm/keep_alive_timeout is used

By Default: If PROCTIMEOUT and TIMEOUT are not set –>icm/keep_alive_timeout is used.

In a system where the default timeout settings of 30 seconds for the keepalive timeout and the processing timeout are not sufficient because of long-running applications, we recommend that you set the TIMEOUT and PROCTIMEOUT parameters for the relevant services so that you can configure them independently of each other. In addition, we recommend that you do not set the TIMEOUT value higher than necessary, for example, to the usual default value of 30 seconds.

We recommend, for example, the following settings: icm/server_port_0 = PROT=HTTP,PORT=1080,TIMEOUT=30,PROCTIMEOUT=600 to allow a maximum processing time of 10 minutes

...

July 2009 5

Page 11: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.1.2 Timeout due to insufficient available dialog work processes in Integration Server

...

Overloaded ABAP server causes ICM

to timeout.

Potential cause for the error: Same as first one, but it results in timeout due to ABAP server being overloaded. This can happen in the high load situation.

When the message flow into the ABAP server from the Messaging System is high, the ABAP dialog processes might not be enough to process all the messages.

This may cause a delay in processing the messages. Such messages waiting to get processed might suffer HTTP timeout at ICM as call from AF to IS fails.

Proposed Solution: Check whether the dialog work processes are properly configured for your hardware.

rdisp/wp_no_dia

Default: 2

July 2009 6

Page 12: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.2 Timeout Calling the Adapter Framework

2.2.1 ICM 402 timeout for http client calls (IS -> AF): ICM_HTTP_TIMEOUT

Application threads

consumed in high load situation.

Increase timeout

parameter to process more

messages

MS causing timeout in

ICM!

Potential cause for the error: During high load situation or when the message is too large, Messaging System may not have enough threads to process the message. This might cause a delay in processing and hence wait time might exceed in ICM causing a HTTP timeout. Hence the wait time should be increased in ICM to prevent the timeout.

Proposed Solution: In general solution is derived from ICM settings.

Value for all ports: icm/keep_alive_timeout (Default: 60 seconds)

Value for specific ports: icm/server_port_0 = PROT=HTTP, PORT=<icmhttpport>, TIMEOUT=30, PROCTIMEOUT=900

If PROCTIMEOUT is not set then TIMEOUT is used, else if TIMEOUT is not set then icm/keep_alive_timeout is used

Default: TIMEOUT and PROCTIMEOUT not set –>icm/keep_alive_timeout is used.

In a system where the default timeout settings of 30 seconds for the keepalive timeout and the processing timeout are not sufficient because of long-running applications, we recommend that you set the TIMEOUT and PROCTIMEOUT parameters for the relevant services so that you can configure them independently of each other. In addition, we recommend that you do not set the TIMEOUT value higher than necessary, for example, to the usual default value of 30 seconds.

July 2009 7

Page 13: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

We recommend, for example, the following settings: icm/server_port_0 = PROT=HTTP, PORT=1080,TIMEOUT=30,PROCTIMEOUT=600 to allow a maximum processing time of 10 minutes.

Note Refer note 824554 - ICM Timeout Parameters for more details.

2.2.2 HTTP 401 – Authentication failure

ICM timed out due to less

connection pool during high load

Each J2EE session will get user verified in the ABAP stack

During high load, user

authentication failure occurs at

ABAP UME

Potential cause for the error: Calling the AF may result in HTTP 401 during high load; this is caused by too few connections to the ABAP user management or a timeout waiting for a new connection.

In the standard J2EE installation the User Management Engine (UME) is configured to use the user database from ABAP-backend. UME has a connection pool wrapper which takes connections from the JCo pool for the backend communication. During creation of a session within the J2EE engine this user is verified directly in the ABAP-database.

The connection pool for these verification calls to the ABAP-side is controlled with J2EE properties in the J2EE service 'UME Provider‘. The problem here is that this connection pool gets exhausted - its default for max number of 10 connections gets reached, and there are no more connections for the other application threads.

July 2009 8

Page 14: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Proposed Solution: Check these parameters in NWA / VA:

ume.r3.connection.master.poolmaxsize

ume.r3.connection.master.poolmaxwait

Default Max. Connections: 20

Default Max. Wait Time: 10.000 ms

Increase parameters until problem disappears: for example,

Max. Connections=50, Max. Wait Time=60000

Example Exception will look like this in default trace:

[EXCEPTION]

{0}#1#com.sap.security.core.persistence.datasource.PersistenceException: Connection pool com.sap.security.core.persistence.datasource.imp.R3JCo

640Proxy_1151956586133_1 is exhausted. The current pool size limit (max connections) is 10 connections.

Current status of connection pool with ID com.sap.security.core.persistence.datasource.imp.R3JCo640Proxy_1151956586133_1: Created on Tue Jul 04 04:56:26 JST 2006

Clients obtained by application code: 2324611, returned: 2324602

Number of connections lent out by the application: 0

Configured maximum number of connections : 10

There is a significant difference between configured and available number of connections. This might indicate an implementation defect in the Java Connector (engine component "com.sap.mw.jco").

July 2009 9

Page 15: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.2.3 HTTP 500 – HTTP_RESP_STATUS_CODE_NOT_OK

ICM gets timed out!

1

Receiver

Potential cause for the error: There could be several reasons for the same-

1. When an http servlet tries to read the request input stream, the following error is thrown or logged: com.sap.engine.services.httpserver.exceptions.HttpIOException: Read timeout. The client has disconnected or a synchronization error has occurred. Read <read-bytes> bytes. Expected <expected-bytes>, <read-bytes> and <expected-bytes> are actual values.

2. Low bandwidth and high latency clients do not receive the full response from http service or receive error http response - 500.

3. During high load some clients do not receive the full response from http service or receive error http response - 500.

4. ICM is setup to forward requests to the Engine and clients randomly fail with the mentioned in 1) "Read timeout" error.

Proposed Solution: ...

1. Increase the proctimeout in smicm as per note - 824554

2. Application threads in the J2EE engine might have got consumed in high load situations. Increase the count of application threads in config tool at location Config Tool -> cluster-data -> <configuration template> -> <instance-ID> -> managers -> ApplicationThreadManager -> MaxThreadCount

July 2009 10

Page 16: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

3. Increase the parameter ServletInputStreamTimeout from 180000 to 1728000000.

Steps for setting this parameter:

a. If you have configured ICM to forward requests to the J2EE dispatcher then apply Note 1048692. If the problem is not resolved, then apply section b.

b. The request bytes are reaching the Engine too slowly

i. Start the configtool in <J2EE>/configtool directory

ii. Browse the tree in the left pane

cluster-data -> Global server configuration -> services -> http

iii. Press the ServletInputStreamTimeout key in the keylist on the right

iv. Change the value of the "Value" field at the bottom of the right pane to the preferred one (in milliseconds).

-1 means there is no timeout - that is unless the full request comes into a single chunk, an error will be thrown

180000 means the Engine would wait for 3 minutes for any byte to be entered in the stream.

1728000000 means the Engine would wait for 20 days for any byte to be entered in the stream

v. Press the "Set" button in the top-right corner

vi. Select from the menu File -> Apply and confirm all popups.

vii. Restart the Engine for changes to take effect

Note Refer to note 807000 for more details on parameter ServletInputStreamTimeout

Example 1 Error as it appears in sxmb_moni:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<! Call Adapter >

<SAP:Error xmlns:SAP=http://sap.com/xi/XI/Message/30 xmlns:SOAP=http://schemas.xmlsoap.org/soap/envelope/ SOAP:mustUnderstand="1">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>

<SAP:P1>500</SAP:P1>

<SAP:P2>Timeout</SAP:P2> …..

<SAP:AdditionalText><H2>500 Connection timed out</H2>...</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>HTTP response contains status code 500 with the description Timeout Error when sending by HTTP (error code: 500, error text: Timeout)</SAP:Stack>

<SAP:Retry>N</SAP:Retry>

July 2009 11

Page 17: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Example 2 XI synchronous scenario RFC <-> XI <-> JDBC is failing (RFC sender adapter) intermittently with the following error :

#Error in processing caused by:

com.sap.aii.af.mp.module.ModuleException: call to messaging system

failed: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout caused by: com.sap.aii.af.ra.ms.api.DeliveryException: Received HTTP response code 500 : Timeout #

2.2.4 HTTP Response Code 503: Service Unavailable

Not enough poll attempts or free

connections

Potential cause for the error: The Integration Server or a backend system sends messages to the XI Adapter Framework (XI, Marketplace, BC, RNIF or CIDX protocol)This happens by calling the 'Receive' servlet of the messaging system: http://<hostname>:<port>/MessagingSystem/receive/<connection>/<protocol>. This operation fails, the server replies with "HTTP Response Code 503: Service Unavailable". The message receives the status "System Error" after all of the retries is run in the Message Display Tool (MDT).

This could also be due to DB being busy while processing other messages.

July 2009 12

Page 18: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Example In the details of the message (error header), you find an entry of the form: "http://server:50000/MessagingSystem/receive/AFW/XI using connection AFWfailed, due to: Received HTTP response code 503: The requested application, AFW, is currently unavailable".

Proposed Solution: • Make sure that the J2EE server is accessible. Check the access to the Receive Servlet as

described above.

• In the Visual Administrator/NWA, navigate to the "SAP XI AF Messaging" service and increase the value of the "pollAttempts" parameter to 100 in the "messaging.connections" property. Do this for all affected connections (AFW, MPA, JPR, RNIFAdapter, CIDXAdapter, BcAdapter). Restart the SAP XI AF Messaging Service and send the message again. Check that all adapter services are started. If required, increase the number of application threads.

As of Support Package Stack 18 (XI 3.0) and Support Package Stack 09 (XI 7.0)

In the Visual Administrator, navigate to the "SAP XI AF Core" service and increase the value of the "pollAttempts" parameter to 100 in the "messaging.connectionDefinition" property. Restart the SAP XI AF Core Service and resend the message. Check that all adapter services are started. If required, increase the number of application threads.

Note HTTP 503 is not a timeout error!

2.2.5 Cluster communication timeout in Adapter Framework Core

Property of Service "XPI Service: AF Core" within SAP NetWeaver Administrator

clusterCommunicationTimeoutMsec.

This specifies the timeout value for the cluster communication in the AS Java Engine. Even though the default value of 15 seconds should be sufficient for the adapter monitoring functionality, you can increase this value in cases where you are experiencing cluster timeout exceptions of the cluster communication mechanism of the Java Engine.

Default: 15000 [ms]

2.2.6 Cluster timeout in Adapter Framework messaging system

Property of Service " XPI Service: Messaging System" within SAP NetWeaver Administrator

messaging.cluster.timeout

The "messaging.cluster.timeout" property specifies the timeout value for the internal cluster communication of the AS Java Engine. The default value of 60 seconds is very generous. If cluster timeout errors still occur, you must increase this value.

Default: 60000 [ms]

July 2009 13

Page 19: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.2.7 Messaging System times out

No reply from receiver causes a timeout in MS.

Receiver

Message flows from AF to IS and then to the

receiver

Either ‘No’ or Delayed’

response from receiver

application

Potential cause for the error: The parameter: 'xiadapter.inbound.timeout.default' is an Adapter Engine messaging system parameter. The value specifies how long the messaging system waits for a response during synchronous communication. If this time elapses, a "MessageExpired" exception is triggered.

This parameter will apply to all synchronous messages going through the Adapter Engine messaging system.

Proposed Solution: Set property of Service "XPI Adapter: XI" within SAP NetWeaver Administrator

xiadapter.inbound.timeout.default

Default: 180000 [ms]

Note If this parameter value is not increased to > 3 minutes then the messages will continue to timeout with the message expired exception.

In NWA, Go to->Operation Management->Systems-> Start & Stop -> Java Services -> (Under Related Tasks) Java System Properties.

July 2009 14

Page 20: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Example Error text looks like this:

<SAP:Error>

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code>MESSAGE.GENERAL</SAP:Code>

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.MessageExpiredException: Message 48c56d90-f764-0172-0000-0000ac11fc6e(INBOUND) expired</SAP:AdditionalText>

</SAP:Error>

July 2009 15

Page 21: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.2.8 XI log showing HTTP CODE 110

Web Server

Receiver

Timeout reached on the receiver web application

Timeout which occurred in

receiver server will get captured and displayed in MS.

Potential cause for the error: • It is a tricky error which occurs due to timeout on third party system.

• Failure happens while calling the receiver application.

• Generally the web server on receiver side throws the time out error which PI captures and displays in Messaging System.

Example Error description in sxmb_moni:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <! Call Adapter >

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30"

xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>

<SAP:P1>110</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

July 2009 16

Page 22: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Error when receiving by HTTP (error code: 110, error text: ) </SAP:Stack>

<SAP:Retry>N</SAP:Retry>

</SAP:Error>

2.3 Timeout settings in specific adapters

2.3.1 Java SOAP Sender Adapter

Web Server

Receiver A delay could happen while processing in IS or

delays in receiver application

Timeout for synchronous

message delivery to the

Adapter

1

Potential cause for the error: This is the timeout for synchronous message delivery to the Adapter Framework. It could also result due to delay in the synchronous response from the receiver application.

Proposed Solution: You can change this value by setting the XI.Timeout parameter in the module configuration table. The value must be set in milliseconds (for example, 300000 for 5 minutes).

Default: 5 minutes

July 2009 17

Page 23: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.3.2 Java SOAP Receiver Adapter

Receiver Timeout

reached in receiver SOAP

adapter

July 2009 18

Page 24: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Potential cause for the error: When the receiver application takes much longer to process the request message and give back the response to the receiver adapter, SOAP on the receiver side can get timed out.

Proposed Solution: The default timeout value for outbound calls is 5 minutes.

You can increase this value by setting parameter XMBWS.Timeout in the module parameter table of the SOAP receiver adapter. The value must be given in milliseconds. For example, value 600000 represents the timeout value of 10 minutes.

July 2009 19

Page 25: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.3.3 Java RFC Sender Adapter

Exception thrown by Adapter Framework

Message gets processed

Receiver

Timeout reached in RFC sender adapter

Potential cause for the error: When an RFC server sends sRFC call as a synchronous XI message to the Adapter Framework, it uses the module processor. The last module in the chain must be the RFC adapter module (localejbs/ RfcAFBean). Within this module, the XI message is sent to the Adapter Framework messaging.

This property sets the timeout, which is used to send the message and wait for a response. If the given time elapses, an exception is thrown by the Adapter Framework and sent back to the sender system.

Proposed Solution: For RFC as the sender, the timeout property for the sync messages will be set in NWA.

Property of Service " XPI Adapter: RFC" within SAP NetWeaver Administrator 'syncMessageDeliveryTimeoutMsec'. If the given time has elapsed, an exception is thrown by the Adapter Framework and sent back to the sender.

Default: 300000 [ms]

In NWA, Go to->Operation Management->Systems-> Start & Stop -> Java Services ->(Under Related Tasks) Java System Properties.

July 2009 20

Page 26: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.3.4 Java File adapter

Receiver Exception thrown

by Adapter Framework

Potential cause for the error (1): You are experiencing sporadic connectivity problems to the FTP server on the transport or network layer, which result in stalled TCP/IP connections and cause the FTP channel to hang indefinitely. If you are using an FTP receiver channel, the message processing within the Adapter Framework

July 2009 21

Page 27: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

stops after the hanging receiver channel has received a certain amount of messages depending on the number of configured worker threads for the Messaging System.

Proposed Solution (1): An updated version of the SAP PI File Adapter allows the configuration of a timeout for FTP sessions that will interrupt the channel's processing if the server has not sent any data for longer than a configurable amount of time.

In order not to break any existing scenarios, the configuration of this timeout requires the use of an advanced mode configuration parameter.

To configure a timeout for the FTP connection, please enable the "Advanced Mode" for the respective FTP communication channel in the Integration Directory and add an entry "ftp.timeout"=timeoutSecs (without any quotation marks) to the "Additional Parameters" section, where timeoutSecs is the desired FTP timeout in seconds.

In more recent support packages you can alternatively set the "Timeout" parameter available in the "FTP Connection Parameters" section.

Note Refer note 849089 for more details

Potential cause for the error (2): You are using Maximum Concurrency parameter of FTP receiver adapter. This parameter ensures that resource pool size (FTP connection size) is limited to specified value per single FTP receiver channel. For instance, setting this parameter to 2 will ensure that a single receiver FTP channel can acquire 2 FTP connections in parallel (if needed).

By default this value is hard coded which results in a timeout.

Proposed Solution (2): Now FTP receiver adapter allows the configuration of a timeout for FTP connection acquiring process. This timeout value will define the maximum waiting time to get the connection from resource pool. If connection is not available within this time, we return the message to Messaging System and the message is in retry mode.

The configuration of this timeout requires the use of an advanced mode configuration parameter.

To configure a timeout for the FTP receiver channels, please enable the "Advanced Mode" for the respective FTP communication channel in the Integration Directory and add an entry "poolWaitingTime" and set to a time in Milli Secs (without any quotation marks) to the "Additional Parameters" section. This parameter is case-sensitive.

Example poolWaitingTime 30000

Note This note is applicable from SP20 onwards for XI 3.0 and SP12 onwards for XI 7.0. For more details refer to note 1136474.

July 2009 22

Page 28: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.3.5 Java JDBC adapter

Potential cause for the error (1): When connecting to DB using JDBC adapter there are instances where DB connection take a long time to establish connection. Some times call made to Driver will hang permanently. This results in Connection timeout, time out, query timeout.

Proposed Solution (1): Setting driver properties would resolve this problem.

• In the advanced mode table section of sender channel and receiver channel configurations, we can set driver properties for each DB connection. Any such property would have to contain prefix 'driver:'(with out quotes)

Example For Oracle Database JDBC thin driver 10.2.0.3 version, the property oracle.jdbc.ReadTimeout helps to set read timeout while reading from the socket. Also for setting login time out in Oracle, we use oracle.net.CONNECT_TIMEOUT. To set these two properties use as follows: driver:oracle.jdbc.ReadTimeout 1000 driver:oracle.net.CONNECT_TIMEOUT 1000 The TimeOut Driver properties like ReadTimeout and CONNECT_TIMEOUT are in milliseconds

July 2009 23

Page 29: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

Note Please note that properties can vary from each driver version. . Please contact DB vendor for the complete list of driver properties.

• In addition to above, we also provide another parameter for query time out. sqlquerytimeout (prefix 'driver:' is not required) is the parameter that is to be used for SQL query time out. This is case-sensitive and should be configured as positive integer value in seconds(greater than 0)

Note Refer note 1078420 for more details

Potential cause for the error (2): You are using Maximum Concurrency parameter of JDBC receiver adapter. This parameter ensures that resource pool size (JDBC connection size) is limited to specified value per single JDBC receiver channel. For instance, setting this parameter to 2 will ensure that a single receiver JDBC channel can acquire 2 JDBC connections in parallel (if needed).

By default this value is hard coded which results in a timeout.

Proposed Solution (2): Now JDBC receiver adapter allows the configuration of a timeout for JDBC connection acquiring process. This timeout value will define the maximum waiting time to get the connection from resource pool. If connection is not available within this time, we return the message to Messaging System and the message is in retry mode.

The configuration of this timeout requires the use of an advanced mode configuration parameter.

To configure a timeout for the JDBC receiver channels, please enable the "Advanced Mode" for the respective JDBC communication channel in the Integration Directory and add an entry "poolWaitingTime" and set to a time in Milli Secs (without any quotation marks) to the "Additional Parameters" section. This parameter is case-sensitive.

Example poolWaitingTime 30000

Note This note is applicable from SP20 onwards for XI 3.0 and SP12 onwards for XI 7.0. For more details refer to note 1136474.

July 2009 24

Page 30: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

2.4 Timeout with Sync/Async Bridge

Receiver/

R3 backend

Delay in response from R3 will result in

timeout at BPM

Potential cause for the error: Integration Engine closes the synchronous connection to the calling program after the timeout condition is met, and as a result, integration processes fail when the system tries to issue a synchronous response.

Proposed Solution: Using transaction SXMB_ADMIN ("Configure Integration Engine"), set the parameter

CHECK_FOR_ASYNC_RESPONSE_TIMEOUT from the SA_COMM category, if the standard timeout of 60 seconds is too short for your integration process.

July 2009 25

Page 31: How to Investigate Timeouts in Synchronous XI PI Scenarios

How to Investigate Timeouts In Synchronous XI/PI Scenarios

July 2009 26

3. Appendix

Reference Notes:

824554 - ICM and SAP Web Dispatcher Timeout Parameter

737625 - Parameter recommendations for the ICM

807000 - Http requests are not fully read after timeout

847466 - BPE-TS: Synchronous/asynchronous communication

816022 - FAQ: XI/PI 3.0/7.0/7.1 J2EE Adapter Engine/Messaging System

849089 - XI 3.0 / PI 7.0 File Adapter: FTP Timeout Handling

1136474 - XI 3.0/7.0: Setting Timeout for acquiring DB/FTP resources

1078420 - XI/PI JDBC Adapter: Setting JDBC driver properties for DB

Page 32: How to Investigate Timeouts in Synchronous XI PI Scenarios

www.sdn.sap.com/irj/sdn/howtoguides