I am an Apigee Edge Public Cloud user. One of my proxies involves many service callouts and is taking more than 1.5 minutes to return. However I can see the proxy going through in my trace , however I am returned a 504 Gateway timed out response in postman client /curl. How can I avoid this ?
Solved! Go to Solution.
@AlayVakil,
Thanks for sharing the org, env and proxy name details.
I had a look and basically this is what is happening:
1. The timeout values are set on the runtime components for your org/env as follows:
ELB (60secs) > Router (57secs) > Message Processor (55secs)
2. There is no target server in your API Proxy.
3. Since the Service Callout policy takes longer time, the timeout value on the Message Processor doesn't come into effect. The Message Processor continues to wait till the Service Callout policy completes its execution and therefore you will see a 200 successful response in the UI trace.
Note: The timeout on Message Processor will come into effect only if there is a target server defined in the target end point.
4. However, since the router has got a timeout value of 57 seconds, you will get a 504 Gateway timeout error in your curl/Postman output after 57 seconds are elapsed.
Possible solutions are:
1. Check if you can modify your Service Callout so that it can complete its execution faster (<57 secs).
2. If #1 is not possible, then the other alternative is to increase the timeout value on all the runtime components to a suitable higher value.
Note: Solution #2 will affect all the API Proxies in your org/env.
Request you to open a Apigee Support Ticket if you decide to take the option #2. We will be glad to assist you.
Regards,
Amar