{"action":"closed","issue":{"url":"https://api.github.com/repos/zalando/skipper/issues/654","repository_url":"https://api.github.com/repos/zalando/skipper","labels_url":"https://api.github.com/repos/zalando/skipper/issues/654/labels{/name}","comments_url":"https://api.github.com/repos/zalando/skipper/issues/654/comments","events_url":"https://api.github.com/repos/zalando/skipper/issues/654/events","html_url":"https://github.com/zalando/skipper/issues/654","id":326820849,"node_id":"MDU6SXNzdWUzMjY4MjA4NDk=","number":654,"title":"Don't respond with status 500 for timeout errors","user":{"login":"mikkeloscar","id":128566,"node_id":"MDQ6VXNlcjEyODU2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/128566?v=4","gravatar_id":"","url":"https://api.github.com/users/mikkeloscar","html_url":"https://github.com/mikkeloscar","followers_url":"https://api.github.com/users/mikkeloscar/followers","following_url":"https://api.github.com/users/mikkeloscar/following{/other_user}","gists_url":"https://api.github.com/users/mikkeloscar/gists{/gist_id}","starred_url":"https://api.github.com/users/mikkeloscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikkeloscar/subscriptions","organizations_url":"https://api.github.com/users/mikkeloscar/orgs","repos_url":"https://api.github.com/users/mikkeloscar/repos","events_url":"https://api.github.com/users/mikkeloscar/events{/privacy}","received_events_url":"https://api.github.com/users/mikkeloscar/received_events","type":"User","site_admin":false},"labels":[{"id":234268900,"node_id":"MDU6TGFiZWwyMzQyNjg5MDA=","url":"https://api.github.com/repos/zalando/skipper/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-27T14:28:40Z","updated_at":"2018-06-06T12:13:21Z","closed_at":"2018-06-06T12:13:21Z","author_association":"MEMBER","body":"See #652 for full context.\r\n\r\nWhen skipper fails to route to a backend e.g. because the pod no longer exists as shown in #652 then it will result in the following error:\r\n\r\n```\r\n[APP]time=\\\"2018-05-25T14:59:56Z\\\" level=error msg=\\\"error during backend roundtrip: kube_default__cluster_registry__cluster_registry_stups_zalan_do____cluster_registry_0: context canceled\\\"\r\n[APP]time=\\\"2018-05-25T14:59:56Z\\\" level=error msg=\\\"Failed to do backend request to http://10.2.108.118:8080: proxy error with code 0, dialing failed false, unwrap: context canceled\\\"\r\n[APP]time=\\\"2018-05-25T14:59:56Z\\\" level=error msg=\\\"error while proxying, route kube_default__cluster_registry__cluster_registry_stups_zalan_do____cluster_registry__lb_group, status code 500: proxy error with code 0, dialing failed false, unwrap: context canceled\\\"\r\n<client> - - [25/May/2018:14:59:46 +0000] \\\"GET /kubernetes-clusters/<cluster_id>?verbose=false HTTP/1.1\\\" 500 22 \\\"\\\" \\\"zmon-worker/0.1\\\" 10010 cluster-registry.stups.zalan.do\r\n```\r\n\r\nThe error `context canceled` means that skipper failed to establish a connection with the backend and timed out after 10s. Responding with a 500 in this case seems wrong to me since it's not really an internal server error but rather a problem routing to the backend. It should either be 504 or 503 to better express what is happening IMO.\r\n\r\nWDYT?\r\n\r\nFor reference the 500 comes from here: https://github.com/zalando/skipper/blob/master/proxy/proxy.go#L690-L694"}}
{"actor":{"display_login":"szuecs"}}