Max number of gateway connections / Maximum number of conversations exceeded

1507034 - Max number of gateway connections / Maximum number of conversations exceeded

If you get the following error in Portal.
Solution and reason is provided below (1507034).

Portal_max_error.png


Symptom
  • max no of 100 conversations exceeded
  • max no of connections (<max_conn>) exceeded
  • max no of cpic clients exceeded (<max_sys>) exceeded
For example when connecting to an SAP ABAP server from the portal (ESS) client application you get the following error:

Portal_max_error.png

Environment
  • SAP Release Independent
  • Enterprise Portal Release Independent

Reproducing the Issue
  1. Client attempts to open more than the permitted maximum number of connections to an ABAP server.
  2. Error triggered on the client side and in the gateway developer trace file (ST11).

Cause
There is a limit to the number of concurrent connections which can be opened on the ABAP server (gateway). When this pre-defined limit is reached subsequent attemts to open new connections trigger the error.

Resolution
On the ABAP server side (where the SAP gateway is running) the following steps should be followed:
  1. Implement SAP note 1157026. As you will see from this note there is a known problem with the "max number of conversations" error which was resolved with kernel patch 156 (either update to kernel patch 156 or apply the workaround by setting the profile paramter gw/gw_disconnect = 0).
  2. Increase the environment variable CPIC_MAX_CONV (for example to 2000) on ALL servers in this landscape (if necessary ask your local system administrator to do this)
  3. Increase profile parameters gw/max_sys & gw/max_conn to the same value (for example if you have set the CPIC_MAX_CONV to 2000 it would make sense to also increase these parameters to 2000) on all gateway servers in this landscape
  4. RESTART THE SERVERS so that these changes take effect
If you are getting the error when connecting to the ABAP backend from the Portal please review the following:
RFC connections from the Portal will remain after logoff. The sessions in the backend remain alive while the connection remains in the free connections j2ee pool. To reduce the time that the connections remain open, you can decrease the connection lifetime following SAP Note 809954:
  • Go to Visual Admin -> server -> services -> Connector Container -> com.sapportals.connectors.sap -> SAPFactory -> Managed Connection Factory -> Connection Definition, and set the Connection Lifetime to, for example 60 (or even less).
This will mean that after 60 seconds, open connections will be released from the pool and the session in the backend will be closed (do not set Connection Lifetime to 0, it means the Connection lifetime never expires).
While you are there, you should also check the value of the Max Connections parameter. You should set the Maximum connections to be half the value of CPIC_MAX_CONV (for example 1000) to avoid a conflict in these settings resulting in the 'max no of conversations exceeded' warning.

See Also
  • SAP note 1157026 "Unjustified syslog Q14"
  • SAP Note 906696 "Timeouts for EP6.0 - R3 Connections"
  • SAP Note 809954 "How to set connection timeout for J2EE Resource"
Similar errors:
  • Syslog Q14 (max no of gateways exceeded) occurs -> See SAP Note 1377863
  • Maximum number of 100 connectable SAP gateways reached -> See SAP Note 978078
  • Syslog 19: Maximum number of  systems reached -> See SAP Note 1481485
  • Connection to SAP gateway fails due to internal error -> See SAP Note 1082391
  •  
  •  
  •  
  •  
  •  

  • ERROR:
  •  
  •  

  • null
    [EXCEPTION]
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CPIC-CALL: CMRCV on convId: 85585846

    LOCATION SAP-Gateway on host 172.16.36.181 / 3391
    ERROR Return codes ( function=STIAsRcvFromGw /
    CPIC-RC=CM_DEALLOCATED_ABEND / SAP-RC=R3_LOGIN_FAILED )
    TIME Thu Jan 30 16:43:29 2014
    RELEASE 720
    COMPONENT CPIC (TCP/IP) with Unicode
    VERSION 3
    RC 772
    MODULE r3cpic_mt.c
    LINE 8692
    COUNTER 82

    at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:557)
    at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:1099)
    at com.sap.mw.jco.JCO$Client.connect(JCO.java:3644)
    at com.sap.mw.jco.JCO$Pool.getClient(JCO.java:5904)
    at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:7081)
    at com.sap.mw.jco.JCO$PoolManager.getClient(JCO.java:7030)
    at com.sap.tc.webdynpro.serverimpl.core.sl.AbstractJCOClientConnection.getClient(AbstractJCOClientConnection.java:442)
    at com.sap.pcuigp.xssfpm.wd.BackendConnections.connectModelInternal(BackendConnections.java:326)
    at com.sap.pcuigp.xssfpm.wd.BackendConnections.connectModel(BackendConnections.java:169)
    at com.sap.pcuigp.xssfpm.wd.wdp.InternalBackendConnections.connectModel(InternalBackendConnections.java:229)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.connectModel(FPMComponent.java:868)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.connectModel(FPMComponent.java:1098)
    at com.sap.xss.ser.xssmenu.fc.ModelHandler.onInit(ModelHandler.java:219)
    at com.sap.xss.ser.xssmenu.fc.wdp.InternalModelHandler.onInit(InternalModelHandler.java:421)
    at com.sap.xss.ser.xssmenu.fc.FcXssMenu.setPersonnelNumber(FcXssMenu.java:573)
    at com.sap.xss.ser.xssmenu.fc.FcXssMenu.onInit(FcXssMenu.java:300)
    at com.sap.xss.ser.xssmenu.fc.wdp.InternalFcXssMenu.onInit(InternalFcXssMenu.java:440)
    at com.sap.xss.ser.xssmenu.fc.FcXssMenuInterface.onInit(FcXssMenuInterface.java:174)
    at com.sap.xss.ser.xssmenu.fc.wdp.InternalFcXssMenuInterface.wdInvokeMethod(InternalFcXssMenuInterface.java:529)
    at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterfaceInvocationHandler.invoke(ExternalControllerPI.java:339)
    at $Proxy2498.onInit(Unknown Source)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:944)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:913)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.attachComponentToUsage(FPMComponent.java:1106)
    at com.sap.pcuigp.xssutils.navi.FcNavigation.onInit(FcNavigation.java:329)
    at com.sap.pcuigp.xssutils.navi.wdp.InternalFcNavigation.onInit(InternalFcNavigation.java:343)
    at com.sap.pcuigp.xssutils.navi.FcNavigationInterface.onInit(FcNavigationInterface.java:156)
    at com.sap.pcuigp.xssutils.navi.wdp.InternalFcNavigationInterface.wdInvokeMethod(InternalFcNavigationInterface.java:275)
    at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterfaceInvocationHandler.invoke(ExternalControllerPI.java:339)
    at $Proxy2497.onInit(Unknown Source)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:944)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.attachComponentToUsage(FPMComponent.java:913)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.attachComponentToUsage(FPMComponent.java:1106)
    at com.sap.pcuigp.xssutils.roadmap.VcRoadmap.onInit(VcRoadmap.java:206)
    at com.sap.pcuigp.xssutils.roadmap.wdp.InternalVcRoadmap.onInit(InternalVcRoadmap.java:147)
    at com.sap.pcuigp.xssutils.roadmap.VcRoadmapInterface.onInit(VcRoadmapInterface.java:162)
    at com.sap.pcuigp.xssutils.roadmap.wdp.InternalVcRoadmapInterface.wdInvokeMethod(InternalVcRoadmapInterface.java:195)
    at com.sap.tc.webdynpro.progmodel.generation.ExternalControllerPI$ExternalInterfaceInvocationHandler.invoke(ExternalControllerPI.java:339)
    at $Proxy2496.onInit(Unknown Source)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:586)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:460)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:215)
    at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:105)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:161)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:227)
    at com.sap.tc.webdynpro.progmodel.components.Component.initController(Component.java:258)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:206)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:590)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doPreprocessing(ClientApplication.java:1457)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:660)
    at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:349)
    at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
    at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
    at com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:89)
    at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:367)
    at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:490)
    at com.sap.tc.webdynpro.serverimpl.wdc.ForwardServlet.doPost(ForwardServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:457)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:276)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
    Caused by:
    RfcException:
    message: CPIC-CALL: CMRCV on convId: 85585846

    LOCATION SAP-Gateway on host 172.16.36.181 / 3391
    ERROR Return codes ( function=STIAsRcvFromGw /
    CPIC-RC=CM_DEALLOCATED_ABEND / SAP-RC=R3_LOGIN_FAILED )
    TIME Thu Jan 30 16:43:29 2014
    RELEASE 720
    COMPONENT CPIC (TCP/IP) with Unicode
    VERSION 3
    RC 772
    MODULE r3cpic_mt.c
    LINE 8692
    COUNTER 82

    Return code: RFC_FAILURE(1)
    error group: 102
    key: RFC_ERROR_COMMUNICATION
    at com.sap.mw.rfc.api.RfcApi.RfcOpen(RfcApi.java:814)
    at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:1092)
    ... 100 more
     



No comments:

Post a Comment