How to change timeout when calling a SAP RFC?

Hello all.

We have some SAP RFCs that takes a little longer to finish.

When called, the flow services hangs waiting for a result. After some time, it throws a timeout exception.

Please, is possible to increase this timeout?

Thank you.

Hi Renan,

depends on where the timeout occurs.
If it is a Service Timeout or a RFC-Connection timeout.
This should be determinable by examining the server.log for the affected IS instance.

Additionally you should check the SAP Adapters Users Guide for further informations.

Regards,
Holger

Hello Holger.

I receive the following timeout when sending data to a RFC Adapter Service:

[SAP.102.9000] JCo error: connection [7/34633907] closed after cancel

        at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcCancel(RfcIoOpenCntl.java:1909)
        at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcConnection.cancel(MiddlewareJavaRfc.java:766)
        at com.sap.conn.jco.rt.ClientConnection.cancel(ClientConnection.java:239)
        at com.sap.conn.jco.rt.ConnectionManager.releaseWithCancel(ConnectionManager.java:307)
        at com.sap.conn.jco.rt.Context.closeConnections(Context.java:326)
        at com.sap.conn.jco.rt.Context.reset(Context.java:389)
        at com.sap.conn.jco.rt.DefaultJCoRuntime.releaseRuntimeContext(DefaultJCoRuntime.java:385)
        at com.sap.conn.jco.rt.SessionTimeoutChecker.execute(SessionTimeoutChecker.java:64)                                                                                                     
        at com.sap.conn.jco.rt.AutoJobRunner.run(AutoJobRunner.java:103)
        at java.lang.Thread.run(Thread.java:748)

Will this help you identify which timeout I’m receiving?

Edit:
I filtered for “timeout” in SAP Adapter User guide, and I found a possibility of changing “watt.sap.jco.timeout” value in “server.cnf”.

“Sets the value during adapter startup
as JCo ‘jco.session_timeout’ property to
define the idle timeout for JCo session
contexts in minutes.
For more information, see SAP JCo
documentation.
Default: Content of
“wa.server.clientTimeout”, or 10 if this
seing is not defined.
Minimum: 1”

Will this increase this solve the exception that I’m receiving?

Hi Renan,

if I remember right there is an additional parameter created with the Adapter Service Template to specify a timeout value.
Additionally check the timeout settings in the SAP Adapters Connection definitions.
Remember to set MinPoolSize to 0 when using Connection Pooling.
Idle Timeout should only apply to currently unused sessions.
But in your case it looks that the active JCo connection gets closed by SAP system before the call is complete.
Might be worth to crosscheck with SAP Basis Team if they can configure something on their side to avoid that the connection gets closed to early.

Regards,
Holger

Hello Holger.

Thank you for your suggestions :grinning:. I followed what you said and I obtained the following:

there is an additional parameter created with the Adapter Service Template to specify a timeout value.

Hmmm… I created a new Adapter Service to call a SAP RFC but unfortunately I didn’t find this parameter. I’m using webMethods 10.3.

Additionally check the timeout settings in the SAP Adapters Connection definitions.

In “Connection Managment Properties” section, both “Block Timeout (msec)” and “Expire Timeout (msec)” are set to 1000. I don’t know if this would fix this issue.

Remember to set MinPoolSize to 0 when using Connection Pooling.

In “Connection Management Properties” section, connection polling is set to “true” and minimum pool size is “0”.

Might be worth to crosscheck with SAP Basis Team if they can configure something on their side to avoid that the connection gets closed to early.

I checked with our SAP Basis Team and they said that “timeout for RFC connections is 7200 seconds” and “it looks like that on IS side is set to only 600 seconds”.

Please, do you know if is there anything else that I should do?

Hi Renan,

did you check the the SAP Adapter Users Guide?

Might be that there is a “watt”-Setting which is controlling the rfc invocation timeout beyond the default session timeout of IS (Default: 10 minutes = 600 seconds).
Each RFC connection is using an IS session in background.

Regards,
Holger

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.