4

I have setted configure and endpoint timeout but it have below response.

What should I pay attention if I want to increase endpoint timeout?

<html>
    <body>
        <h1>504 Gateway Time-out</h1>
The server didn't respond in time.
    </body>
</html>

There are 3 steps to set timeout but it appear fault....

1) Global timeout defined in synapse.properties (EI_HOME\conf\synapse.properties)

synapse.global_timeout_interval=17000000

2) Socket timeout defined in the passthru-http.properties (EI_HOME\conf\passthru-http.properties )

http.socket.timeout=18000000

3) Also set timeout in API.

<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="ep_dsData" xmlns="http://ws.apache.org/ns/synapse">
    <http method="post" uri-template="{uri.var.origin.ds}/api/v1/GetData">
        <timeout>
            <duration>17000000</duration>
            <responseAction>fault</responseAction>
        </timeout>
    </http>
</endpoint>
Amanda
  • 131
  • 3
  • 15
  • Did you get this error from the client side? Do you want to increase timeout for all endpoints in EI or a specific one? – Muralidharan.rade Dec 20 '17 at 12:19
  • Yes, this error message is response to client side and I hope I can increase timeout for all endpoints. Do you have any idea to solve this problem?Thank you. – Amanda Dec 21 '17 at 02:17
  • You have configured the timeout value as 5 hours, what is the use case that needs this? provide some info the client system and also the backend server or services that are used – Muralidharan.rade Dec 27 '17 at 15:59
  • I use the external http backend services to get a big data but it take a lot of time to wait the response. – Amanda Dec 28 '17 at 04:17

1 Answers1

2

The following link clearly explains the configurations requried for tuning the timeout variables in WSO2 EI. Please refer it once again.

https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices#WSO2EnterpriseIntegratorBestPractices-Workingwithendpoints

The timeout limit shared in the question is very abnormal, 5 hours.

Remember, the following..

  1. http.socket.timeout > max(Global endpoint timeout,Timeout of individual endpoints).

  2. Also if you have configured a timeout value at the endpoint level, the global timeout value is not taken into consideration for that endpoint. For all the other endpoints, which do not have a timeout value configured, the global value is considered as the timeout value.

Muralidharan.rade
  • 2,226
  • 1
  • 24
  • 34
  • I have changed 2 parameters of timeout in EI as below.If I set below parameter(synapse.global_timeout_interval and http.socket.timeout) less than < 60 seconds have normal timeout.On the other hand, below parameter(synapse.global_timeout_interval and http.socket.timeout) > 60 seconds and it is strange that always will be not exceed more than 60 seconds timeout. Whether have other parameters need to be set or changed?Thank you. Parameter 1 : synapse.global_timeout_interval(/conf/synapse.properties) Parameter 2: http.socket.timeout(/conf/passthru-http.properties) – Amanda Dec 28 '17 at 10:13
  • Since, if you have configured a timeout value at the endpoint level, the global timeout value (synapse.global_timeout_interval) will not taken into consideration for that endpoint. Try changing the value at the endpoint level – Muralidharan.rade Dec 28 '17 at 15:14
  • Thank you for your suggestion but I have setted the timeout parameters that synapse.global_timeout_interval = 300000, http.socket.timeout = 600000 and the endpoint level (Connection Timeout of Action = never timeout)...it always will be not exceed more than 60 seconds timeout...If exceed more than 60 seconds, the client side will be response the error message:

    504 Gateway Time-out

    The server didn't respond in time.
    – Amanda Dec 29 '17 at 03:37
  • Since the http socket timeout is specified as 60 seconds, the client side error makes sense and the connection socket will be terminated by wso2 – Muralidharan.rade Dec 29 '17 at 19:18
  • But I have set the http.socket.timeout = 600000(10 minutes not 60 seconds)....and it's not exceed more than 60 seconds timeout... – Amanda Jan 02 '18 at 01:20
  • I suppose WSO2 is fine. Check on backend http service that is used. Check the socket timeout on that system and also the Gateway system – Muralidharan.rade Jan 02 '18 at 20:39
  • 1
    I delete the EI file and reinstall, it can work....thank you for your help. – Amanda Jan 25 '18 at 02:10