This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
API Manager-level settings
Timeout configurations for an API call
The following diagram shows the communication/network paths that occur when an API is called. The timeout configurations for each network call are explained below.
Key validation
Key validation occurs via a Servlet HTTP call and the connection timeout can be configured by changing the following configuration details in the<WSO2_OB_APIM_HOME>/repository/conf/axis2/axis2_client.xmlfile. All timeout values are in milliseconds.<transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender"> <parameter name="SO_TIMEOUT">60000</parameter> <parameter name="CONNECTION_TIMEOUT">60000</parameter> </transportSender>If the Key Manager caching is enabled, the calls between the API Gateway and Key Manager are cached. As a result, the Key Manager is not invoked for each API call.
Client call API Gateway + API Gateway call Backend
For backend communication, the API Manager uses PassThrough transport. This is configured in the<WSO2_OB_APIM_HOME>/repository/conf/passthru-http.propertiesfile. For more information, see Configuring passthru-http.properties in the EI documentation.
General APIM-level recommendations
Some general APIM-level recommendations are listed below:
Improvement Area | Performance Recommendations | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
API Gateway nodes | Increase memory allocated by modifying the
Set the following in the
<parameter name="defaultMaxConnPerHost">1000</parameter>
<parameter name="maxTotalConnections">30000</parameter> The above configurations are only applicable when WS key validation is enabled. | ||||||||||||||
NHTTP transport of API Gateway | Recommended values for the Property descriptions:
Recommended values:
| ||||||||||||||
PassThrough transport of API Gateway | Recommended values for the Property descriptions
Recommended values
Make the number of threads equal to the number of processor cores. | ||||||||||||||
Timeout configurations | The API Gateway routes the requests from your client to an appropriate endpoint. The most common reason for your client getting a timeout is when the Gateway's timeout is larger than the client's timeout values. You can resolve this by either increasing the timeout on the client's side or by decreasing it on the API Gateway's side. Here are a few parameters, in addition to the timeout parameters discussed in the previous sections.
| ||||||||||||||
Key Manager nodes | Set the MySQL maximum connections: mysql> show variables like "max_connections";
max_connections was 151
set to global max_connections = 250;
Set the open files limit to 200000 by editing the sudo sysctl -pSet the following in the If you use WSO2 Identity Server (WSO2 IS) as the Key Manager, then the root location of the above path and the subsequent path needs to change from maxThreads="750"
minSpareThreads="150"
disableUploadTimeout="false"
enableLookups="false"
connectionUploadTimeout="120000"
maxKeepAliveRequests="600"
acceptCount="600" Set the following connection pool elements in the <maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>Note that you set the |