JCO_ERROR_REQUEST_CANCELLED error

Hi,

Our webMethods software translates EDI data to SAP IDoc.
We are often getting JCO_ERROR_REQUEST_CANCELLED error from IS.

Also, we are getting the following error on the server.log.
‘Available Thread Pool Warning Threshold Exceeded: 14% available’

These two errors are related?
Can anyone advise me what are the causes and how to fix it?
I’d appreciate if any information you could give me.

[ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service pub.sap.transport.ALE:OutboundProcess.
[SAP.102.9000] JCo error: (112) JCO_ERROR_REQUEST_CANCELLED - connection with handle 4 [05221534] closed after cancel
Stack trace:
at com.sap.conn.rfc.engine.RfcIoOpenCntl.RfcCancel(RfcIoOpenCntl.java:1911)
at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcConnection.cancel(MiddlewareJavaRfc.java:806)
at com.sap.conn.jco.rt.ClientConnection.cancel(ClientConnection.java:246)
at com.sap.conn.jco.rt.ConnectionManager.releaseWithCancel(ConnectionManager.java:218)
at com.sap.conn.jco.rt.Context.closeConnections(Context.java:352)
at com.sap.conn.jco.rt.Context.reset(Context.java:412)
at com.sap.conn.jco.rt.DefaultJCoRuntime.releaseRuntimeContext(DefaultJCoRuntime.java:261)
at com.sap.conn.jco.rt.SessionTimeoutChecker.execute(SessionTimeoutChecker.java:60)
at com.sap.conn.jco.rt.AutoJobRunner.run(AutoJobRunner.java:103)
at java.lang.Thread.run(Thread.java:662)

Can you review and apply the settings to see if it resolves the issue

watt.server.clientTimeout=XX
watt.sap.rfc.callDuration=XX

Also provide your current SAP adapter fix levels with IS.

Thank you for your quick response.

As you recommended, I set the watt.server.clientTimeout value from 10 to 15, however there was no setting for watt.sap.rfc.callDuration on server.cnf.
Can you suggest a desirable initial value for that?

Our IS service restarts by itself once in three or four days or more often sometimes after exhausting all the threads.

Below is our adapter specification.

Description:webMethods SAP Adapter
Adapter Version:7.1.0.8.822
Updates:SAP_7.1_Fix8
JCA Spec Version:1.0
Vendor Name:Software AG

OS Version:6.1
Current User:SYSTEM
Working Directory:C:\SoftwareAG\IntegrationServer

JCo Version:3.0.9 (2012-07-19)
JCo Middleware:JavaRfc
JCo Middleware Version:2.2.8
JCo Native Library Version:720.310
JCo Native Library Location:C:\SoftwareAG\IntegrationServer\lib\sapjco3.dll
IDoc Library Version:3.0.8 (2012-10-12)

Try these settings on your sandbox or test servers, also check the fix readme, the details matches the issue that you are currently facing.

WSP-827 (SAP_7.1_Fix8)
webMethods SAP Adapter transaction processing fails with the following error: 
JCO_ERROR_REQUEST_CANCELLED.

During long-running SAP client calls, SAP Adapter may abort the processing with 
a JCO_ERROR_REQUEST_CANCELLED error message. The error occurs when JCo is 
checking for the Integration Server session associated with the call,
but the Integration Server session has already timed out. As a result, JCo 
aborts the client call to SAP with an error. This can happen if you have a 
lengthy task, such as sending out 10,000 IDocs, and the task takes longer than 
the Integration Server session timeout. An easy and direct solution would be to 
increase the watt.server.clientTimeout parameter value (to perhaps 30 mins or 
more). However, this might not be desirable in some installations.

This issue is resolved. When it is not desirable to increase the value of 
watt.server.clientTimeout, SAP Adapter provides a new configuration parameter,
watt.sap.rfc.callDuration. With the new parameter, you prevent premature 
Integration Server session timeouts during SAP client calls.

watt.sap.rfc.callDuration
Set the maximum duration of SAP client calls (in minutes) directly so that the 
associated Integration Server session cannot timeout and expire during the 
execution of an SAP client call.
For example, to set the call duration to 30 minutes, specify:

    watt.sap.rfc.callDuration=30
    
The parameter has a default value equal to the Integration Server session 
timeout value as specified in watt.server.clientTimeout. The minimum value of 
the parameter is 10 (minutes). There is no maximum value.

For information about setting server configuration parameters and working with 
extended settings, see Administering webMethods Integration Server.

=================================

Also, try to set the watt.sap.jco.timeout and watt.sap.listener.session.timeout to a higher value from the default 10 minutes.

1 Like

Thanks again.

I increased the values of watt.sap.rfc.callDuration and watt.server.clientTimeout.
I will observe the impact for some time.

The watt.sap.jco.timeout and watt.sap.listener.session.timeout were not in the server.cnf either.

After watching the results, I will set these values and see what’s going to happen.

Hi Yohan,

you should consider updating SAP Adapter Fix and JCo Version.

Latest SAP Adapter Fix is Fix19 and JCo-Version is 3.0.19 meanwhile.
JCoIDoc-lib is availabe in version 3.0.13.

Regards,
Holger

Holger,

Thank you for your suggestion.

Mahesh,

After changing the configuration, I do not see the JCO_ERROR_REQUEST_CANCELLED error so far, however I am getting the following errors.
Looks like these errors are related to the change I made. These were thrown by different threads and different time. I think we are pushing too many requests to SAP and to Database server now.

Any suggestions on these?

[SQLServer JDBC Driver]Login has timed out.

An error occurred while attempting to retrieve a connection from rbxsapconn.connections:connNode_SAPPRD
A connection was not available for request in pool

rbxsapconn.connections:connNode_SAPPRD
Caused by: com.wm.adk.error.AdapterServiceException: [ART.117.4012] Adapter Runtime (Adapter Service): Unable to run adapter service. Error occurred when connecting to resource rbxsapconn.connections:connNode_SAPPRD.

What is your wM version? You might need to open a SR if the SAG if you have the support contract with them.

Can we now try to revert the settings added (as this setting should resolve the issue explained with the current SAP fix level), and install the latest SAP and IS fix levels on your sandbox and perform another round of tests? or go with the said settings with some fine tuning on IS memeory and threads.

Please share the log file if you encounter any issues.

Hi,

if possible, you can check if you can increase the JVM MaxMemory in the startup configuration of IS and Wrapper.

You can then increase the number of threads via IS Admin UI under Settings → Resources.

Regards,
Holger

Hi ,

To avoid this error as much possible:

Yes I would also suggest first update this max thread setting (bump up) as part of desired IS tuning and performance aspect.

Let us know the out come of this changes and any metrics you taken.

HTH,
RMG

Thanks all for your time.

Our WM version is 8.2.2.0 which runs on Windows Server 2008 R2 Standard server with 32G RAM and 64-bit and we are considering the WM upgrade to later version soon.

This is our JVM memory setting.
set JAVA_MIN_MEM=2048M
set JAVA_MAX_MEM=4096M
set JAVA_MAX_PERM_SIZE=2048M

I made a change to Maximum threads 300 → 350 → 400, Session Timeout 10 → 20 → 30 and JDBC Connection Maximun connections for IS and TN from 40 to 60.

I will watch few more days and revert the values if it is getting other issues.

Let us know if the issue still exists even after the changing the memory and threads. Also, try installing the latest fix levels and give it a try.

Perfect and yes please make sure the Server behavior after these tuning changes:)

Cheers!
RMG