Skip to Content
avatar image
Former Member

release SAP Connection / set connection timout period in SAP JCo connection

We are facing following error while executing RFC externally by using JCo (106) JCO_ERROR_RESOURCE: Connection pool KEY172.16.8.16430000|CONFIGURED_USER&300|NEWGEN1|EN|5E0907430C739F9A9B87338172B96F10 is exhausted. The current pool size peak limit is 10 connections. Pool KEY172.16.8.16430000|CONFIGURED_USER&300|NEWGEN1|EN|5E0907430C739F9A9B87338172B96F10 created 10 clients 1 client [1/30827337] is idle since 13847461 ms, since last call 13847476 ms, function BAPI_TRANSACTION_COMMIT [stateful session id: Client-624-1]

1) Kindly guide what is making the connection pool to be exhausted . If the RFC is successfully executed the connection is automatically released and becomes available for other call. ?

2) Can we set some properties like the session timeout period ?

i.e. we are using jco.destination.pool_capacity , jco.destination.peak_limit etc . any connection timeout properties are there ?

3) Can we capture the error if the connection is not released ? and any JCo API is there in SAP JCO 3.0 and SAP JCO2.1 to release the connection via code?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 06, 2017 at 02:18 PM

    This error message announce that there are no available JCo connections.

    Whether one JCo connection will be released or stays "occupied" depends on the application that is using it - whether it is STATELESS or STATEFUL. So, we need to start from there. What is your application? How does it manages the sessions to the ABAP backend? From the end of the error message you have posted it is reported the session to be STATEFUL - "stateful session id: Client-624-1"

    Please revise the version of FRAMEWORK.SCA you do use.

    In the old NW AS Java releases ARFC model is used. This is STATEFUL, which means the application has to check and close the connection if it is not used.

    Later the ARFC2 has been implemented that was monitoring and closing the idle connections (STATELESS). However, this has been changed recently as well

    2316926 - disconnectAllStatefullSessionsAPI introduced to disconnect all stateful connections of a JCO destination

    From what you do report it seems like the application that is using the JCo is, using exactly STATEFUL sessions.

    What is the version of the FRAMEWORK.SCA? If it is higher than 7.30 SPS 7 then your developers have to change the application accordingly

    due to the stateless behavior of WD_APPLICATION_SESSION_SCOPE


    Add comment
    10|10000 characters needed characters exceeded