-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http proxy error context canceled #264
Comments
How often did this happen and how many failures did you see? What was the CPU load during the test?I haven't seen this error but my guess is that you should see some aborted connections/requests on the upstream servers as well. Could you run the same test on the HTTP port as well? |
I see those errors every time I run over http I see no errors in nginx error.log on upstream servers. |
I've got the same error during my bench with vegeta tools ... https://github.com/tsenart/vegeta 1500req/s , 10 workers during 3minutes. A lot of errors like this :
1 fabio, listening in HTTPS, 5 backend (just 5 nginx with a hello world) serving in HTTP (fabio soes the SSL terminaison) See the error in vegeta :
Nginx use standard configuration (i can maybe tune it a little ...) but only 300req/s per NGINX so not so much. Fabio use 102400 value for nofile and 32768 for nproc and this : sudo sysctl -w fs.file-max="9999999" I do not know if the client failed (32 cores and 512GB of RAM for running the benchmark), or fabio or nginx ... nor explicit log in nginx |
We see the "context cancelled" at a rate of about 3% of all requests. CPU load is negligable (couple %), RAM usage ~50MB. |
+1 |
I'm also noticing lots of context cancelled messages in the error log and they are mostly correlated with requests being logged with Response 502 in the access log. @magiconair do you know if the context cancelled error can be causing lots of 502 in our access logs and why? I've done some research and people have this issue in the Caddy proxy server as well and it seems to be related to clients closing the connection prematurely. From my understanding, 502s should be thrown only if Fabio is unable to connect to upstreams which I believe is not the case in our environment. Referencehttps://caddy.community/t/error-context-canceled/2034 |
@danlsgiga I'm not sure if related but in our scenario Fabio can connect to the upstreams fine, see #673 |
@scalp42 in our scenario too, its just misleading logs! |
while benchmarking fabio I've noticed
in logs.
it is t2.micro AWS instance that was tuned with those changes:
could you please elaborate on those errors in logs?
I used wrk
behind balancer there were two
t2.medium
instances with nginx installed.The text was updated successfully, but these errors were encountered: