Apigee Edge Public Cloud
In some transactions, we are seeing timeout error happening at ~57 sec whereas some transactions don't timeout even if its taking ~3mins
We have io.timeout.millis configured at ~4mins but proxy_read_timeout property hasn't been set. Is it required to set proxy_read_timeout value as well ? If yes then why some transactions don't timeout even after 57 sec.
Hello @shivam1006, we truly appreciate your post and your patience as we keep track of your question. We’ll make sure you get the answers you need, and we also invite the community to pitch in with their thoughts.
I don't think you need to set proxy_read_timeout just yet. The proxy_read_timeout is set on the virtual host and configures how long the Router should wait for the message processor to respond. I just want to make sure I understand:
1) you have io.timeout.millis configured for 4 minutes (which seems kind of long)
2) some requests time out after 57 seconds.
3) you have some requests that do not timeout even if the request is taking 3 minutes.
This definitely seems odd.
My questions are:
* Are the requests going to the same proxy and conditional flow?
* Are they going to the same target service?
* I'm assuming you set the i.timeout.millis in the Proxy Target Endpoint and this is not for a Service Callout policy. Is that correct?
* What is the error message (504 or 408, something else)? We need to identify the request parameters of those few requests that timeout after 57 seconds?
* any additional details you can provide to identify those few requests that fail after 57 seconds? A redacted trace session perhaps?
when you say we don't need proxy_read_timeout to be set, how will the router time be set when message processor has timeout of ~4mins?
Yes, that's the correct understanding1) you have io.timeout.millis configured for 4 minutes (which seems kind of long)
2) some requests time out after 57 seconds.
3) you have some requests that do not timeout even if the request is taking 3 minutes.
The request goes to same proxy and conditional flow.
Proxy1 >Proxy2>Proxy3>Backend
Sometimes 57 sec timeout we are seeing is at proxy1 even though other proxy are taking ~3mins. I assume it to be happening because of router timeout.
Yes it goes to same target service and io.timeout.millis is set at target endpoint & not at servicecallout. The error message is 504 {"fault":{"faultstring":"GatewayTimeout","detail":{"errorcode":"messaging.adaptors.http.flow.GatewayTimeout"}}}
The request parameters are same for both request
Ok, so you have 3 Apigee proxies, chained in a row.
Proxy1 has a Target Endpoint of Proxy 2
Proxy 2 has a Target Endpoint of Proxy 3
Proxy 3 has a Target Endpoint of Backend.
Proxy 1 is throwing the gateway timeout error for some requests.
ALL proxies (Proxy1, 2 & 3) have io.timeout.millis configured for 4 minutes AND the router timeout is set to the default for all proxies.
I find it strange that some requests can take longer than 3 minutes in Proxy 2 and Proxy 1 does not timeout even though the default Router timeout is 57 seconds. It seems to me that all requests would fail with a gateway timeout error if the processing time takes longer than 57 seconds. I still think I'm missing some important details about your request.
Go ahead and change the router timeout and see what happens and post the result.
This link is also really helpful troubleshooting Edge Gateway Timeout errors.
https://docs.apigee.com/api-platform/troubleshoot/runtime/504-gateway-timeout
Good luck!
Hey @shivam1006, thank you for continuing to engage in the forum, and thank you, @williamssean, for providing replies to this question!
If you find either of the responses helpful, consider marking one of them as the accepted solution to assist others facing similar situations.
For more insights, we also invite you to explore the articles shared in the community! 😊
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |