Increase timeout on public cloud to resolve 504 Gateway timeout error

We want to increase timeout for few proxies due to slow legacy backend service. We tried following approaches to increase timeout to 70 seconds at proxy level but none of them worked.

  1. Added following properties at HTTPTargetConnection
<Properties>
	<Property name="io.timeout.millis">70000</Property>
        <Property name="keepalive.timeout.millis">70000</Property>
        <Property name="connect.timeout.millis">70000</Property>
</Properties>

2. Added following properties to at HTTPTargetConnection

<Properties>
	<Property name="io.timeout.millis">70000</Property>
        <Property name="keepalive.timeout.millis">70000</Property>
        <Property name="connect.timeout.millis">70000</Property>
</Properties>

And added below property to HTTPProxyConnection

<Property name="api.timeout">70000</Property>

3.Added following properties to both HTTPTargetConnection and HTTPProxyConnection

<Properties>
	<Property name="io.timeout.millis">70000</Property>
	<Property name="keepalive.timeout.millis">70000</Property>
	<Property name="api.timeout">70000</Property>
	<Property name="connect.timeout.millis">70000</Property>
</Properties>

All above methods increased the timeout just 2 seconds from 55 (default timeout) to 57 seconds. Now we tried to set timeout to 20 seconds using same approach and it worked. We also tried to increase timeout on virtual host (proxy read timeout and proxy keepalive timeout) but did not work.

Please let us know the possible solution to increase time out on Apigee public cloud (paid) . We are not looking streaming option as some data manipulation required on proxy.

1 4 1,330
4 REPLIES 4

Apigee has two timeouts: From the Router->Message Processor and Message Processor->Backend.

For the timeout to work the way you want, you'll need to increase the Virtual Host timeout as well as the HTTPTargetConnection Timeout, because otherwise the Router will give up before the MP does. On public cloud you can do this on the Virtual Host(s) that this proxy is using. Assuming you want a backend timeout of 70 seconds, you should set the "Proxy Read Timeout" slightly higher than that - 72 seconds or so.

We tried by increasing Virtual Host timeout but same behavior - proxy times out at 57 seconds.

57 seconds is the maximum timeout allowed in SaaS. You can only change this to lower values

In my virtual host i have put timeout of 300 seconds but still it fails at 55secs. Is there no possible way to increase timeout from 55secs in public cloud?