WSO2 ESB has defined some configuration parameters which controls the timeout of a particular request which is going out of ESB. In a particular scneario, your client sends a request to ESB, and then ESB sends a request to another endpoint to serve the request.
CLIENT->WSO2 ESB->BACKEND
The reason for clients getting timeout is that ESB timeout is larger than client's timeout. This can be solved by either increasing the timeout at client side or by decreasing the timeout in ESB side. In any of the case, you can control the timeout in ESB using the below properties.
1) Global timeout defined in synapse.properties (ESB_HOME\repository\conf\) file. This will decide the maximum time that a callback is waiting in the ESB for a response for a particular request. If ESB does not get any response from Back End, it will drop the message and clears out the call back. This is a global level parameter which affects all the endpoints configured in ESB.
synapse.global_timeout_interval=120000
2) Socket timeout defined in the passthru-http.properties (ESB_HOME\repository\conf\) file. This parameter will decide on the timeout which a particular http request is waiting for a response. If ESB does not receive any response from the Back End during this period, HTTP connection get timed out and that will eventually throws timeout error in the ESB side and fault handlers will be hit.
http.socket.timeout=60000
3) You can 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 30 seconds and then execute the fault handler.
<timeout>
<duration>10000</duration>
<responseAction>fault</responseAction>
</timeout>
CLIENT->WSO2 ESB->BACKEND
The reason for clients getting timeout is that ESB timeout is larger than client's timeout. This can be solved by either increasing the timeout at client side or by decreasing the timeout in ESB side. In any of the case, you can control the timeout in ESB using the below properties.
1) Global timeout defined in synapse.properties (ESB_HOME\repository\conf\) file. This will decide the maximum time that a callback is waiting in the ESB for a response for a particular request. If ESB does not get any response from Back End, it will drop the message and clears out the call back. This is a global level parameter which affects all the endpoints configured in ESB.
synapse.global_timeout_interval=120000
2) Socket timeout defined in the passthru-http.properties (ESB_HOME\repository\conf\) file. This parameter will decide on the timeout which a particular http request is waiting for a response. If ESB does not receive any response from the Back End during this period, HTTP connection get timed out and that will eventually throws timeout error in the ESB side and fault handlers will be hit.
http.socket.timeout=60000
3) You can 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 30 seconds and then execute the fault handler.
<timeout>
<duration>10000</duration>
<responseAction>fault</responseAction>
</timeout>
thanks for this information. digital transformation services
ReplyDeletenice information thanks for sharing...................!
ReplyDeleteworkday online training
power bi course
mulesoft training
pega training
servicenow training training
When shopping for a Wedding loan, it’s important to consider the interest rate. This will be the primary factor in determining how much you pay for your loan. You can compare interest rates on online lenders to find the lowest possible rate.
ReplyDeleteLoan For Wedding