I’ve some API’s registered behind kong (vesion - 0.10.3)which takes more than one minute to generate response. Though I’ve given upstream_connect_timeout, upstream_send_timeout, upstream_read_timeout values 5 min, the kong returns 504 timeout after one minute.
It seems like something is going wrong here, the timeout values seem correct to me. Would you investigate the following possibilities:
- Restart Kong and retry the request.
- Upgrade to 0.10.4 and retry.
- If the above fail, upgrade to 0.11.2 and retry.
Finally, it would be useful if you could provide us with contents of the error logs if you’ve see anything suspicious in there.
Would you also mind sharing details regarding your upstream services, especially how many replicas are running, and if Kong is load balancing between them via DNS records (or via the Upstream/Targets interface), and any layer 4 failure which would cause Kong to maybe pick a different host and use the default 60s values for this new attempt.
Let us know if your findings.
Restarting kong I’ve already tried. And there are no replicas running and neither there is any load balancer. Just an single instance of Kong is there. Regarding the upstream service, it is restricted to our VPN only.
In that case, let’s try options 2 and 3: please try upgrading to 0.10.4, and if that fails, 0.11.2.
Another thing to consider is, in case you have multiple
apis pointing to that same upstream, whether the route being taken is the one for which you set the timeouts (https://getkong.org/docs/0.10.x/proxy/#routing-priorities).