-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Proxy] 502 context canceled #1828
Comments
Thanks for the detailed report. That log message usually just means the client stopped loading the resource before it was finished. Generally nothing to worry about, especially if things are working. :) Let us know if there's anything else! |
Okay. Good to know. I was a little bit confused because it's logged as error message. Would be good to have client/server messages split in order to get a better understanding of what is going on. |
Yeah, I agree, although it's hard to tell which kind of message it is unless I add special exceptions for the text of the error value - as far as I know. And the text string can probably change, so it's not a robust way of doing it. |
Can you boil it down to a reproducible test case for us to verify and experiment with? |
I deleted the comment because a co-worker provided some additional information suggesting it's likely we're cancelling requests in some of the non-browser clients after all. |
There is a general sentiment, FWIW, that "502" doesn't seem quite right since it's a situation caused by the client. Basically, we think of 5xx as something caused by a problem inside the proxy or with something upstream. We think of 4xx as something that originates downstream. If the request was canceled, the client isn't really looking at the response anymore, but for logging purposes, something 4xx seems like it would be more informative. |
Gotcha, that makes sense. Sorry, I got your comment in an email, which doesn't get deleted when a comment here is deleted. :P We can look into changing the response status if we can determine that a context cancelled is what is happening. |
1. What version of Caddy are you using (
caddy -version
)?0.16.0
2. What are you trying to do?
Caddy <-> Nginx <-> Phusion Passenger <-> Web application
Using caddy as transparent reverse proxy for nginx.
3. What is your entire Caddyfile?
4. How did you run Caddy (give the full command and describe the execution environment)?
caddy -conf /etc/caddy/caddy.conf -agree -http2=false
5. Please paste any relevant HTTP request(s) here.
Replaced cookie _domain-3_session="dDFjM2c2cUJZNjRIeHF6K05TRUd6NjAyZ3BycGRoczhwQWlCNHJXUzgxQ2RtOXV3RjI3empwdVlHMkZ6QXZWOEdZUThGbmh3UnJNR2pBME5MQnY3Vjc3UEtVUnMrbHhlOERjdmNCcFRSWExoYTU1ekxUUnZFdFU1VDR3bGJqZXVVbFhOQzlQbFNpVGJYbGFXN1JzczB3PT0tLWZNcWRoUnBkUzFKVmIvTzhxTGpBalE9PQ%3D%3D--154a10b7fedc901b56af64f0fb68576d7dee5ee3" for domain www.domain.com, path /, expire 0
< Set-Cookie: _domain-3_session=dDFjM2c2cUJZNjRIeHF6K05TRUd6NjAyZ3BycGRoczhwQWlCNHJXUzgxQ2RtOXV3RjI3empwdVlHMkZ6QXZWOEdZUThGbmh3UnJNR2pBME5MQnY3Vjc3UEtVUnMrbHhlOERjdmNCcFRSWExoYTU1ekxUUnZFdFU1VDR3bGJqZXVVbFhOQzlQbFNpVGJYbGFXN1JzczB3PT0tLWZNcWRoUnBkUzFKVmIvTzhxTGpBalE9PQ%3D%3D--154a10b7fedc901b56af64f0fb68576d7dee5ee3; path=/; HttpOnly
< Status: 200 OK
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< Vary: Accept-Encoding
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Powered-By: Phusion Passenger 5.1.6
< X-Request-Id: 27a2b427-3da1-4c62-9140-3e8e782c2b7e
< X-Runtime: 1.357073
< X-Xss-Protection: 1; mode=block
< Transfer-Encoding: chunked
Received 199 B chunk
Received 2.2 KB chunk
Received 528 B chunk
Received 3.8 KB chunk
Received 3.8 KB chunk
Received 3.8 KB chunk
Received 3.3 KB chunk
Connection adding support for php including clean urls and wordpress permalinks #1 to host www.domain.com left intact
Saved 1 cookie
6. What did you expect to see?
I am getting errors on the log but the web application seems to work.
But I am not sure we have 20 incoming connections per second and
the 502 error shows up sometimes.
7. What did you see instead (give full error messages and/or log)?
15/Aug/2017:18:30:03 +0200 [ERROR 502 /berufe/flugbegleiter/] context canceled
15/Aug/2017:18:30:15 +0200 [ERROR 502 /ajax/main_search/] context canceled
15/Aug/2017:18:30:27 +0200 [ERROR 502 /] context canceled
8. How can someone who is starting from scratch reproduce the bug as minimally as possible?
Maybe I can provide a test environment. But I need to check that option.
The text was updated successfully, but these errors were encountered: