This documentation is for WSO2 API Manager 2.6.0. View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added reasons for timeout https://github.com/wso2/docs-apim/issues/29

...

If you have enabled the pass-through transport, you can change its default configurations by adding the  following under the <transportReceiver name="https" class="org.apache.synapse.transport.passthru.PassThroughHttpSSLListener"> element in the  <PRODUCT_HOME>/repository/conf/axis2/axis2.xml file. Be sure to stop the server before editing the file.

If you are using JDK 1.7.* or 1.JDK 1.8.*, add the parameter given below: 

...

To disable the self signup capability, open the API-M management console and click the Resources > Browse menu. The registry opens. Navigate to the /_system/governance/apimgt/applicationdata/sign-up-config.xml file and set the <SelfSignUp><Enabled> element the  element to false. To engage your own signup process, see Adding a User Signup Workflow.

...

To resolve this issue, first access the Gateway URL via a new browser tab of the same browser and accept the certificate from the browser. 

I

...

The {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} - Error while getting Recently Added APIs Information error occurs in JDK 1.7.0_45 and is fixed in JDK 1.7.0_51 onwards. See here for details of the bug.

In JDK 1.7.0_45, all XML readers share the same XMLSecurityManager and XMLLimitAnalyzer. When the total count of all readers hits the entity expansion limit, which is 64000 by default, the XMLLimitanalyzer's total counter is accumulated and the XMLInputFactory cannot create more readers. If you still want to use update 45 of the JDK, try restarting the server with a higher value assigned to the DentityExpansionLimit.

I get a Hostname verfiication failed exception when trying to send requests to a secured endpoint. What should I do?

...

get a Hostname verification failed exception when trying to send requests to a secured endpoint. What should I do?

Set the <parameter name="HostnameVerifier"> element to AllowAll in <API-M_HOME>/repository/conf/axis2/axis2.xml file's HTTPS transport sender configuration. For example, <parameter name="HostnameVerifier">AllowAll</parameter>.

This parameter verifies the hostname of the certificate of a server when the API Manager acts as a client and does outbound service calls.

When I add new users or roles, I get an error message stating that the entered user name is not conforming to policy. What should I do?

This is because your user name or password length or any other parameter is not conforming to the RegEx configurations of the user store. See Managing Users and Roles.

When I call a REST API, a lot of temporary files are created in my server and takes up a lot of space. What should I do?

There might be multiple configuration context objects created per API invocation. Check whether your client creates a configuration context object per API invocation. You can also configure a HouseKeeping task in the <API-M_HOME>/repository/conf/axis2/axis2.xml file's HTTPS transport sender configurationcarbon.xml file to clear the temporary folders. For example, <parameter name="HostnameVerifier">AllowAll</parameter>.

This parameter verifies the hostname of the certificate of a server when the API Manager acts as a client and does outbound service calls.

When I add new users or roles, I get an error message stating that the entered user name is not conforming to policy. What should I do?

This is because your user name or password length or any other parameter is not conforming to the RegEx configurations of the user store. See Managing Users and Roles.

When I call a REST API, a lot of temporary files are created in my server and takes up a lot of space. What should I do?

There might be multiple configuration context objects created per API invocation. Check whether your client creates a configuration context object per API invocation. You can also configure a HouseKeeping task in the 

Code Block
languagexml
<HouseKeeping> 
        <AutoStart>true</AutoStart> 
        
        <!-- The interval in *minutes*, between house-keeping runs --> 
        <Interval>10</Interval> 

        <!-- The maximum time in *minutes*, temp files are allowed to live in the system. Files/directories which were modified more than 
         "MaxTempFileLifetime" minutes ago will be removed by the house-keeping task --> 
        <MaxTempFileLifetime>30</MaxTempFileLifetime>
</HouseKeeping>
Why do I get a Gateway Failures error?

The Gateway Failures UI error occurs when the ServerURL, username, password and/or GatewayEndpoint is incorrect. This can be rectified by checking and correcting the gateway configurations under <Environments> in the <API-M>/repository/conf/api-manager.xml file. 

Tip
If you are using the API-M instance you used as the first instance in the Publish through Multiple API Gateways tutorial, you may receive the above error when trying out other tutorials. This is because you updated the environments configurations in that pack by adding two API Gateway environments under the <Environments> element,  and commenting the <environment> element that comes by default. To overcome this error, uncomment the default configuration and delete the newly added configuration under <Environments> in the <API-M>/repository/conf/api-manager.xml file.


Why does a timeout occur between the client and WSO2API-M connection before API Manager sends the response to the client?

The following are two possible reasons behind this timeout.

  • The backend not being available.
  • The backend may be slow

There are two socket timeouts, connection timeout and read timeout.

The connection timeout is the timeout in making the initial connection (i.e., completing the TCP connection handshake). The read timeout is the timeout on waiting to read the data. A read timeout error occurs if the server fails to send a byte seconds after the last byte.

The http.connection.timeout and http.socket.timeout are two different configurations that are defined in the <API-M_HOME>/repository/conf/carbon.xml file to clear the temporary folders. For example,

Code Block
languagexml
<HouseKeeping> 
        <AutoStart>true</AutoStart> 
        
        <!-- The interval in *minutes*, between house-keeping runs --> 
        <Interval>10</Interval> 

        <!-- The maximum time in *minutes*, temp files are allowed to live in the system. Files/directories which were modified more than 
         "MaxTempFileLifetime" minutes ago will be removed by the house-keeping task --> 
        <MaxTempFileLifetime>30</MaxTempFileLifetime>
</HouseKeeping>
Why do I get a Gateway Failures error?

The Gateway Failures UI error occurs when the ServerURL, username, password and/or GatewayEndpoint is incorrect. This can be rectified by checking and correcting the gateway configurations under <Environments> in the <API-M>/repository/conf/api-manager.xml file. 

...

passthru-http.properties file to handle the connection timeout and read timeout for sockets respectively.

http.connection.timeout defines a max time period to establish a connection with the remote host, and the http.socket.timeout defines the time waiting period for data after establishing the connection, which relates to the maximum time of inactivity between two data packets.

Therefore, you can maintain a high value for the http.socket.timeout parameter to avoid a connection read timeout related error. Thereby, you can increase the endpoint timeout value accordingly.

Example:
By default the socket timeout value (the socket timeout for the HTTP listener) is 60 seconds. If you observe a socket timeout error in your error logs, it means that the backend is taking longer than 60 seconds to respond.

Therefore, you can increase the socket timeout of the passthrough HTTP transport in the <API-M_HOME>/repository/conf/passthru-http.properties file to 120 seconds (http.socket.timeout=120000).

Usually, you would not need a high value for the HTTP connection timeout (http.connection.timeout), because it is expected to establish a connection with a server within 10 to 20 seconds. However, if it takes longer, you need to work on scaling the backend as it can not handle the current load that you are expecting.

How can I capture the state of a system?

...

The REG_LOG table contains all the registry operations performed for all the registry resources in the system. When you clean up this table, you need to keep the latest record from every resource path to maintain atleast at least one resource reference in case of reindexing. Exceute Execute the following query to clean this table.

...