Tuesday, June 6, 2017

Configuring timeout intervals in WSO2 ESB.

WSO2 ESB has several timeout settings and you have to consider following order when setting timeouts:

Socket Timeout > max (Global endpoint timeout, Timeout of individual endpoints)

endpoint timeout :

You could define timeouts on the endpoint configuration such that it will affect only that particular endpoint. This will be a better option if you need to configure timeouts per endpoint for different Back End services. You can also define the action upon the timeout. Below example configuration will set the endpoint to timeout in 120 seconds and then execute the fault handler.

<timeout>

    <duration>120000</duration>

    <responseAction>fault</responseAction>

</timeout>

synapse.global_timeout_interval property could be configured in the following way:

1. The open ESB_HOME /repository/conf/synapse.properties file.

2. Add synapse.global_timeout_interval property if it is not defined already (The default value is 120 seconds).

synapse.global_timeout_interval=120000

3. Save the file and restart the ESB.

Follow below steps to set http.socket.timeout property:

1. Open <esb_home>/repository/conf/passthru-http.properties file.

2. Add http.socket.timeout property if it not defined already.

http.socket.timeout=150000

3. Save the file and restart the ESB.