{"action":"created","issue":{"url":"https://api.github.com/repos/openresty/openresty/issues/200","repository_url":"https://api.github.com/repos/openresty/openresty","labels_url":"https://api.github.com/repos/openresty/openresty/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/openresty/openresty/issues/200/comments","events_url":"https://api.github.com/repos/openresty/openresty/issues/200/events","html_url":"https://github.com/openresty/openresty/issues/200","id":179438996,"number":200,"title":"proxy_next_upstream may fail in some cases","user":{"login":"xbsura","id":2181072,"avatar_url":"https://avatars.githubusercontent.com/u/2181072?v=3","gravatar_id":"","url":"https://api.github.com/users/xbsura","html_url":"https://github.com/xbsura","followers_url":"https://api.github.com/users/xbsura/followers","following_url":"https://api.github.com/users/xbsura/following{/other_user}","gists_url":"https://api.github.com/users/xbsura/gists{/gist_id}","starred_url":"https://api.github.com/users/xbsura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbsura/subscriptions","organizations_url":"https://api.github.com/users/xbsura/orgs","repos_url":"https://api.github.com/users/xbsura/repos","events_url":"https://api.github.com/users/xbsura/events{/privacy}","received_events_url":"https://api.github.com/users/xbsura/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-27T09:17:57Z","updated_at":"2016-09-27T15:54:27Z","closed_at":null,"body":"hi:\r\n\r\nMaybe its not a bug or feature of openresty, but I download the whole tar from openresty project, so I asked here, if this is not reasonable, just tell me and i will delete it\r\n\r\nAfter upgrading openresty version from 1.9.7 to 1.11.2, the percent of 502 online increase, in nginx conf, 502 is configed to retry:\r\n\r\n```\r\nproxy_next_upstream error timeout http_502 invalid_header;\r\n```\r\n\r\nBut in fact, some http 502 do not retry, just exit, at the same time, some strange thing happened:\r\n\r\n1. log, not all 502 do not retry, just 502 with such log in error.log do not retry\r\n```\r\nrecv() failed (104: Connection reset by peer) while reading response header from upstream\r\n\r\nor\r\n\r\nupstream prematurely closed connection while reading response header from upstream\r\n```\r\n\r\n2. at this time, openresty echo the standard 502 html\r\n\r\nSo what the problem is ?\r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/openresty/openresty/issues/comments/249908961","html_url":"https://github.com/openresty/openresty/issues/200#issuecomment-249908961","issue_url":"https://api.github.com/repos/openresty/openresty/issues/200","id":249908961,"user":{"login":"agentzh","id":56241,"avatar_url":"https://avatars.githubusercontent.com/u/56241?v=3","gravatar_id":"","url":"https://api.github.com/users/agentzh","html_url":"https://github.com/agentzh","followers_url":"https://api.github.com/users/agentzh/followers","following_url":"https://api.github.com/users/agentzh/following{/other_user}","gists_url":"https://api.github.com/users/agentzh/gists{/gist_id}","starred_url":"https://api.github.com/users/agentzh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agentzh/subscriptions","organizations_url":"https://api.github.com/users/agentzh/orgs","repos_url":"https://api.github.com/users/agentzh/repos","events_url":"https://api.github.com/users/agentzh/events{/privacy}","received_events_url":"https://api.github.com/users/agentzh/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T15:54:27Z","updated_at":"2016-09-27T15:54:27Z","body":"@xbsura Looks like it is related to the following change in the official nginx core (since 1.9.13):\r\n\r\n>     *) Change: non-idempotent requests (POST, LOCK, PATCH) are no longer\r\n>       passed to the next server by default if a request has been sent to a\r\n>       backend; the \"non_idempotent\" parameter of the \"proxy_next_upstream\"\r\n>       directive explicitly allows retrying such requests.\r\n\r\nSee http://nginx.org/en/CHANGES"}}
{"actor":{"display_login":"agentzh"}}