JCO connection pool is exhausted

hi
I am using RFC module in my web dynpro application. When the application is used for sometime, the JCO connection will get exhusted. The JCO connection will not release itself. I can't find any method in web dynpro to release the connection manually. How can I solve this problem?

Hi,
What is scope of the connection. View properties of MODELDATA and METADATA  destinations.
You can change the scope of the connection..
or
wdContext.current<BAPI INPUT>Element().modelObject().modelInstance().disconnectIfAlive();
For more ways , give a forum search.. There are a lot of close forum posts.. Gud luc..
Regards
Bharathwaj

Similar Messages

  • How to use a JCO connection pool in an EJB?

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

  • JCO Connection pooling

    hi,
    <b>How to create connection pooling in WAS for SAP R/3 System.</b>
    I have  written session bean for Creating SalesOrder in SAP Using JCO.
    my application will create 100 connection objects if 100  Client Calls for my SessionBean  .so that i need to avoid creation of connection objects  for <i><b>every time</b></i>.
    pls tell me how configure WAS for JCO connection pooling .and How to get those connection objects. and how to use that connction object in my application.
    regards
    Guru

    Hi
    See this help
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/85343e8c7f6329e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Kind Regards
    Mukesh

  • Web dynpro console - monitor - JCO Connection pools

    If you go to the web dynpro console -> monitor -> JCO connection pools you see a table with information.
    JCo Clients MonitorJCO Pools - 12:31:02.992
      Name Size Currently used Maximum used Max.connections Max.pool size
    Can somebody explain what for example the "Size" and "Maximum used" mean in this table?
    And if you have set max.pool size to 20, what things can override this setting in the SAP system?

    Hi,
    You can follow this link for information on JCO in Web Dynpro Java:
    [http://help.sap.com/SAPHELP_NW04S/helpdata/EN/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm|http://help.sap.com/SAPHELP_NW04S/helpdata/EN/3a/3b1b40fcdd8f5ce10000000a155106/frameset.htm]
    -Kunal Kotak

  • Problem with JCo Connection Pool

    Hi,
    I have a problem with using an RFC Model in my WebApplication. So sometimes the access to the function block works, and sometimes it doesn't work. Now I know, that there is a problem with the connection pool. Look at this message:
    com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool WD_X24_MODELDATA_DEST_CPIC_REKTO_DE_useDefinedUser is exhausted. The current pool size limit (max connections) is 10 connections.
    So it looks like a problem with closing the JCo Connections after using. Do know where the problem is? Because I'm using many other function blocks with no problems.

    Hello,
    You need to increase the pool size via Visual Administrator.
    Server 0 -> Services -> JCO RFC Connections.
    Change the pool size from there. I believe a restart is in order.
    Regards,
    Jan

  • Configuring JCo3 Connection Pool with single sign on on non SAP Java server

    Hi Everyone,
    i have configured a connection pool on JBoss as per JCo3 Documentation and is working great.
    Now I need help to configure this connection pool with single sign on so that RFc on SAP ECC systems are executed using end users credential rather than using single user name password used to configure JCo connection pool.
    On SAP Java stack I am sure its possible within Java WebDynpro    and i assume using JCA resource adapter. But what if we don't want to use SAP Java App server.
    Any help will be appreciated.
    Thanks,
    Divyakumar Jain

    Eason, 你好!
    I have exactly the same problem.  Did you find a solution to this problem?  If so, please let me know!

  • Unable to close metadata jco connection

    Hi Experts,
    when checking the JCo Connection Pools in Web Dynpro Console, I found that all MetaData JCo are in use and unable to disconnect automatically.
    the following is metadata jco destination setting
    Maximal Pool Size 1
    Maximum Connections 5
    Connection Timeout 60
    Maximum Wait Time 10
    how can i do to close these jco connection?

    Hi Sidney,
    I dont really understand why you want to remove the Jco connections. If you click on the "Remove" button as posted earlier by someone, it will completely remove your Jco configurations and you have to create them again on your own. SO, dont do that.
    If you want to disconnect the Jco connection in webdynpro java, we can do that by using the following piece of code at the end of the  connection process.
    As far as I know, by default the Jco connections gets disconnected after certain time limit. Because, I never had to disconnect the Jco whenever I used one.
    wdContext.currentModelElement().modelObject().modelInstance().disconnectIfAlive()
    Regards,
    Gopal.

  • Finding component that does not close JCO connections

    Hi,
    I'm working on a big project with many webdynpro components. My problem is that I seem to be loosing JCO connections. After a while I get JCO connection errors. I just can't find which component is causing this. I checked over and over again.
    Is there a way to check how many JCO connections an application/component has or at least how many open connections a model has?
    I really need to know which component is causing my loss of JCO connections.
    Thanks all!
    Jeschael

    Hi Jeschael,
    Go to System Administration -> System Configuration -> Select Web Dynpro Console -> (Model & backend- You  can check JCo performance by component)  or ( JCo Connection Pools you can check max. calls and active connections for JCos)
    Regards,
    Siva

  • Disconnect JCO Connection

    Hi,
    In WebdynPro Application without using Adaptive RFC, we are able to disconnect a connection after few seconds as we using disconnect() method for that.
    But for a WebdynPro Application using Adaptive RFC, we are not able to disconnect a connection as fast as we were able to do in first case.
    We are using following to disconnect:
    wdContext.currentInputElement().modelObject().modelInstance().disconnectIfAlive();
    In SM04 transaction, we observed that the connection(Adaptive RFC) is taking more time to close than it is taking for without Adaptive RFC WD application. The connection still exists even the memory utilized becomes 0 MB.
    Also, when we are not disconnecting in Adaptive RFC WD application, then memory is utilized as long as connection exists. But, when we are disconnecting the connection, the memory utilized is 0 MB though the connection still exists.
    While creating the JCo connection for metadata and modeldata we gave:
    Max pool size : 5
    Max connection: 1000
    Connection Timout (msec.) : 1000
    Maximum Waiting Time (msec.): 5000
    Can anybody suggest how to disconnect the connection to overcome above problem?
    Thanks and Regards,
    Vaibhav

    Hi
    Check this URL
    Actually The Connection will be Terminated when it is inactive for particular time
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/85a483cb-0d01-0010-2990-c5168f01ce8a">Jco Connection Pools</a>
    Regards
    Chandran S

  • Connection pool SAPPool is exhausted

    hi..
    I am getting this following error in my application
    om.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool SAPPool is exhausted. The current pool size limit (max connections) is 50 connections.
    at com.sap.mw.jco.JCO$Pool.getClient(JCO.java:5366)
    at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:6324)
    at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:6269)
    at com.sap.mw.jco.JCO.getClient(JCO.java:8536)
    at com.tcs.interfaces.sapConnectionUtility.JCOClient_Connection.connectToSAP(JCOClient_Connection.java:21)
    at com.tcs.interfaces.wifi.outbound.DisablingWifi.disableWifi(DisablingWifi.java:110)
    at com.tcs.interfaces.jco.StartJob.run(StartJob.java:68)
    at java.lang.Thread.run(Thread.java:636)
    The front end PMS (Property Management System) - SAP Customised product is unable to connect with the JCo Middleware server because of the above mentioned error.
    The thing is that in java application I have set the maximum pool size (SAPPool) to 50.
    Still we are facing this error twice a week.
    Is there any kind of setting in SAP server side where JCo RFC connection limits can be set ?
    Can any pls help in this regard.

    After reading the url that you have pointed out: i have a question our from my
    curiosity:
    is there any overhead that does have if connection pool is very high say 100 and
    the required is say like 70.
    Thank You very much.
    Rob Woollen <[email protected]> wrote:
    I usually recommend that for production systems. There's some info here:
    http://edocs.bea.com/wls/docs81/perform/WLSTuning.html#1123237
    -- Rob
    Mike wrote:
    Thanks Rob,
    is it a good idea to make InitialCapacity equal to the MaxCapacity?
    say making InitialCapacity = MaxCapacity = 50
    while thread count is also = 50
    Rob Woollen <[email protected]> wrote:
    Typically thread count = connection pool size is a good starting point.
    You might want thread count > connection pool size if you want to
    throttle work to the database, or if you have some threads which will
    never require a db connection.
    You might want connection pool size > thread count if remote clients
    are
    starting transactions or reserving connections. Another case is if
    a
    single thread starts multiple transactions.
    -- Rob
    Mike wrote:
    what is the relationship between thread count and connection pool
    Eg, if i have a thread count of =50
    and connection pool = 36
    how does these 2 parameters work together ?
    is there any equation between the 2 ?
    --Mike

  • RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded. Connection Pool - JCO api

    Hi Everyone
    My Connection  Pool parameters JCO api.
    client=300
    user=SISGERAL_RFC
    passwd=******
    ashost=14.29.3.120
    sysnr=00
    size=10
    I have these parameters on my Connection Pool and sometimes appear these wrongs in my application:
    1.
    2006-01-07 13:20:37,414 ERROR com.tel.webapp.framework.SAPDataSource - ##### Time limit exceeded. LOCALIZED MESSAGE = Time limit exceeded. KEY = RFC_ERROR_SYSTEM_FAILURE GROUP = 104 TOSTRING = com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Time limit exceeded.
    2.
    2006-01-07 14:01:31,007 ERROR com.tel.webapp.framework.SapPoolConnectionManager - Timeout
    I’d like to know if is happening.
    Are there something wrong with my connection pool?
    What can be happening?
    Thanks

    Raghu,
    Thanks for your response.
    Yes, the pool connections are in place according to the sAP note mentioned above.
    Regards,
    Faisal

  • JCO Connection constructor: Pool already initialized

    Hi Folks,
    while i'm configuring a JCO connection to R/3, i got a little problem:
    In my class constructor i initialize a client pool.
    JCO.addClientPool(sapSID, sapMaxConnections, sapMandant, sapUser, sapPasswort, sapLanguage, sapSystem, sapSystemNumber);
    JCO.getClientPoolManager().getPool(sapSID).setMaxWaitTime(maxWaitTime);
    problem:
    when there is already a client pool, the application crashes
    solution:
    check if there is already a connection-pool with this name
    i tried the following:
    1) Check if there's a pool with the name
              if (JCO.getClientPoolManager().getPool(sapSID).getName()==sapSID) {
    ==> which leads to a null pointer exception because logically there is no pool and as the doc says "if there's no pool, .getPool(String) will return null, which leads to:
    2) Check if null
              if (JCO.getClientPoolManager().getPool(sapSID)==null) {
    but unfortunately. this won't work either.. null point exception again.
    anyone got a hint?
    thx in advance,
    lars
    Message was edited by:
            Lars Paetzold

    i remove the waittime part now, but it won't work anyway:
    java.lang.NullPointerException
    if (JCO.getClientPoolManager().getPool(sapSID)==null) {
         if (JCO.getClientPoolManager().getPool(sapSID).getName().toString()==sapSID.toString()) {
         } else {
              JCO.addClientPool(sapSID, sapMaxConnections, sapMandant, sapUser,
                                  sapPasswort, sapLanguage, sapSystem, sapSystemNumber);     
    if i'm not checking if there is any kind of pool, everything works fine until i call the application a second time and the pool is already initialized

  • Connection pool exausted

    Dear all,
    I am new to j2ee environment.
    RFC from PI Java stack to PI ABAP stack failing intermittently. Error message: Error while lookupProblem when calling an adapter by using communication channel CC_RFC_LookUp (Party: , Service: PPICLNT900, Object ID: 2e663396395c3213aaecd4e7746a8ddd) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_RFC_LookUp]2e663396395c3213aaecd4e7746a8ddd is exhausted. The current pool size limit (max connections) is 1 connections.'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_RFC_LookUp]2e663396395c3213aaecd4e7746a8ddd is exhausted. The current pool size limit (max connections) is 1 connections.'
    When we go to http://hostname:50100/webdynpro/dispatcher/sap.com
    we can see RFC CC_RFC_LookUp and MAx connection parameter set to 1.
    Rest of RFCs are having maximum connections as 20.
    Please let us know what is the procedure to change MAX connection parameter for this
    particular RFC CC_RFC_LookUp and which parameter we need to change and where should we find
    this parameter?
    Regards,
    RR

    Thanks Manoj,
    I have gone through VA nodes ... could please mention which node i need to make this pareameter changes.
    Please note : currently all other JCO pool RFCs are set to Max connections 20 .
    But this particular RFC CC_RFC_LookUp under JCO pool tab shows
    max connections set to only 1.
    Please let me know where in VA i will find this parameter?

  • Connection pool size limit error

    Hi all,
    I am trying to execute a BAPI function from MII, execution fails with the following message;
    [ERROR] Unable to make RFC call Exception: [Problem retrieving JCO.Function object: Connection pool <ECC_Server>:800:02:EN:ECCUser is exhausted. The current pool size limit (max connections) is 1 connections.]
    [WARN] [SAP_JCo_Function_0] Skipping execution of output links due to action failure.
    [ERROR] Uncaught exception from SAP_JCo_Function_0, Problem retrieving JCO.Function object: Connection pool <ECC_Server>:800:02:EN:ECCUser is exhausted. The current pool size limit (max connections) is 1 connections.
    Config:
    1. In 'SAP MII: Connections' of type JCO and have given pool size to 100.
    2. In 'SAP MII: Credential Stores' store is created and same is being used in Start Session.
    3. In  JCO_Function block, we can search for the Function Module and set it.
    MII Version:
    14.0.2 Build(82)
    Am I missing something?
    Has any one seen this? please advise.
    Thanks,
    Message was edited by: Shridhar N

    Check if there is another JCo connection configured with the same IP and User. I have found in the past that even though there are two connections configured because they have the same ip and user they are put into one pool with the lowest max pool of the two connections.

  • Error while obtaing JCO connection

    In Bussiness planning in portal. When i click Planning tab in Enterprise portal, its throwing an error that "error while obtaining JCO connection". I cant proceed furtherI
    I am working in my own system.
    I have checked many posts and i have done some JCO destinations as per the instructions but it's vain.
    The detailed error is as follows;
    500   Internal Server Error
    Web Dynpro Container/SAP J2EE Engine/6.40
    Failed to process request. Please contact your system administrator.
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: ComponentUsage(CharRelInst): Active component must exist when getting interface controller. (Hint: Have you forgotten to create it with createComponent()? Should the lifecycle control of the component usage be "createOnDemand"?
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.ensureActiveComponent(ComponentUsage.java:773)
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getInterfaceControllerInternal(ComponentUsage.java:348)
    at com.sap.tc.webdynpro.progmodel.components.ComponentUsage.getInterfaceController(ComponentUsage.java:335)
    at com.sap.ip.bi.plan.workbench.wdp.InternalInfoprovController.wdGetCharRelInstInterface(InternalInfoprovController.java:296)
    at com.sap.ip.bi.plan.workbench.InfoprovController.checkSavable(InfoprovController.java:254)
        ... 48 more
    please give some pointers like what needs to be done JCO settings in Backend.
    Thanks in advance.

    Niranjan,
    3 causes and many more....
    First and most probable cause is that your CR content in SLD is old....
    FIX - to fix this download latest cimsap and crcontent from service.sap.com and implement in SLD.
    Second cause user is locked
    FIX - unlock in R/3
    Third cause could be that the connection pool in JCO is exhausted.
    FIX - increase connection pool in JCO.
    More causes.
    With this new version it appears that any error before connection is created ends up showing this, so I would really go into default trace and look there for original errors, that is the way I found JCO pool was exhausted, that error was not being forwarded and instead it was showing this error...
    reward points if helpful

Maybe you are looking for