SAP jobs hung in SAP System Agent. The log indicates JCo connection exception due to max number connections exceeded with error like below:
26994.26655875_1/WAAE_WF0.1/MAIN STATE UNKNOWN Status(Unknown) LStatus(BAPI_XBP_JOB_STATUS_GET- JCoException: Connect to SAP gateway failed
Connection parameters: TYPE=B DESTINATION=###:900:EN:#### MSHOST=#### R3NAME=### GROUP=#### PCS=1
LOCATION CPIC (TCP/IP) on local host with Unicode
ERROR max no of 202 conversations exceeded
Release: All Supported Versions
Component: Workload Automation Agent for SAP
The SAP Java Connector (JCo) is attempting to establish more connections (conversations) with the SAP gateway than the configured limit allows. The default limit is often 202.
Set this parameter in the agent's agenparm.txt file. This should allow JCo to open more connections.
jco.cpic_maxconv=<some higher number>
For example;
jco.cpic_maxconv=500
Restart the agent for the change to be effected.
Note: This value can be increased, but we strongly recommend consulting SAP Basis team to determine the maximum number of CPIC conversations allowed by the SAP RFC Gateway before making any changes.