Open tmiroslav opened 2 years ago
Hey @tmiroslav ,
I believe for the timeouts to work it has to be set on the proxy level (local_connect_timeout_ms
in gateway-internal-api
service definition) and in the upstream config ( what you have set above ) -- I suspect that may be the issue. If you already set that value in the gateway-internal-api
service definition and it's still not working, could you provide that file so we can look into this further?
Hi @Amier3
Thank you! I am going to test this and will come to you as soon as I get results.
BR, Miroslav
Hi @Amier3
It's no better after adding local_connect_timeout_ms
in gateway-internal-api
service definition.
I am running Consul in VMs. I have service cpanel
talk to service gateway-internal-api
. I already pasted above cpanel
service definition. This is gateway-internal-api
,after I added proxy config parameter you suggested:
service {
name = "gateway-internal-api"
port = 8787
connect {
sidecar_service {
proxy {
config {
local_connect_timeout_ms = 10000
}
upstreams = [
{
destination_name = "exhibitor"
local_bind_port = 10025
},
{
destination_name = "redis"
local_bind_port = 10060
},
]
}
}
}
Still, I am getting in the logs something like:
user_id=92a70b0f-a3da-43a9-a176-f95b475117 client_ip=77.46.205.166 operation_name=getPoolStatus [error] GET http://localhost:10000/api/v1/servers/ -> error: :timeout (5001.237 ms)
Where I can see that it still timeouts after 5s!? Is this a bug, or I am still missing to set configs properly?
Thank you!
Hi @Amier3
Any advice what I should do next? Should I go for Consul/Envoy upgrade maybe for this to make working? We are facing this issue in production, and it's really urgent to do something to overcome 5s timeouts!
Thanx! Miroslav
Hey @tmiroslav
Apologies for the delayed response! After looking into this issue a bit more, I realized that i'd need to pull in some of the engineering team to help figure out how to fix this and if an upgrade was required. Due to the holidays that were quickly approaching, it was hard to find the bandwidth to dig deep into this in December.
Are you still experiencing this issue and did you end up upgrading to try to fix it?
@tmiroslav
Also, it'd help a lot if you can provide us with an envoy config dump using curl localhost:19000/config_dump
@tmiroslav maybe have a look at my comment here: https://github.com/hashicorp/consul/issues/6382#issuecomment-758318964 - I suspect the section on Upstream Request Timeouts is what you're running into, as it's not something that has been addressed yet. I have a couple of proposed options on that PR (including one you can use today with a service-router, and another which disables the upstream timeouts entirely, which we do with a custom build of Consul presently).
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
It ls failing to setup connection timeout in upstream config per docs here
A paragraph or two about the issue you're experiencing: I am facing timeouts every time upstream service that my service is connecting to is not responding in 5s. This is too low for my use case and I want to extend this timeout to 10s. But when setup proper connect_timeout_ms in upstream config, I realize that my service still timeouts after 5s. So, my config change in upstream proxy config is not applied.
Reproduction Steps
Steps to reproduce this issue, eg:
This is my service definition file:
Consul info for both Client and Server
Consul v1.8.3 Envoy 1.14.2
Client info:
Server info:
Operating system and Environment details
more /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"