Problem: During performance testing of an OData SDK Application using a Connection Template to a Netweaver Gateway pool, an Error 500 event occurs in the client.
The specific client-side error message is:
Error occurred while connecting to the URL sent: Gateway not reachable. The target server failed to respond.
error stack trace: 2013-05-07 19:32:15.264 ERROR PROXY HttpChannel Thread-127 [com.sybase.sup.odp.handler.DirectProxy] [] [] IOException caught in fire request :while connecting to the URL sent: shaded.org.apache.http.NoHttpResponseException: The target server failed to respond at shaded.org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:101) at shaded.org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at shaded.org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281) at shaded.org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at shaded.org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at shaded.org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298) at shaded.org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at com.sybase.sup.odp.handler.DirectProxy.GWCall(DirectProxy.java:455)
Explanation: Your Proxy endpoint is configured with connection pool size value that is too high for the number of connections used by Netweaver. Generally, the maximum concurrency on the Gateway system is limited by the number of available dialog processes (kernel parameter rdisp/wp_no_dia). Therefore, the Gateway system rejects connections when there are no resources available. Ensure that enough work processes exist in both the Gateway system and in any SAP EIS systems (for example, SAP ERP or CRM) to handle the peak load.
You can throttle the number of connections used by SAP Mobile Platform by setting a proxy connection pool size on each SAP Mobile Server node. Generally, SAP recommends that you limit this value to be less than 70% of backend concurrent working processes for the Gateway. For example, if the Gateway uses the maximum of 25, then set this value to 10 or 12.
For details on how to create a Proxy connection, see Creating a Proxy Connection (Whitelisting) in Developer Guide: REST API Applications and for configuring a Proxy connection the server, see Configuring SAP Mobile Server to Securely Communicate With an HTTP Proxy and Proxy Properties in SAP Control Center Online Help.