{"action":"created","issue":{"url":"https://api.github.com/repos/nghttp2/nghttp2/issues/563","repository_url":"https://api.github.com/repos/nghttp2/nghttp2","labels_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/563/comments","events_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/563/events","html_url":"https://github.com/nghttp2/nghttp2/issues/563","id":145114678,"number":563,"title":"Random 502 responses on OSX","user":{"login":"bstst","id":412859,"avatar_url":"https://avatars.githubusercontent.com/u/412859?v=3","gravatar_id":"","url":"https://api.github.com/users/bstst","html_url":"https://github.com/bstst","followers_url":"https://api.github.com/users/bstst/followers","following_url":"https://api.github.com/users/bstst/following{/other_user}","gists_url":"https://api.github.com/users/bstst/gists{/gist_id}","starred_url":"https://api.github.com/users/bstst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bstst/subscriptions","organizations_url":"https://api.github.com/users/bstst/orgs","repos_url":"https://api.github.com/users/bstst/repos","events_url":"https://api.github.com/users/bstst/events{/privacy}","received_events_url":"https://api.github.com/users/bstst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nghttp2/nghttp2/labels/nghttpx","name":"nghttpx","color":"c7def8"},{"url":"https://api.github.com/repos/nghttp2/nghttp2/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-04-01T07:59:24Z","updated_at":"2016-04-24T16:51:58Z","closed_at":null,"body":"Issue: Almost always getting 502 responses. Sometimes it goes through though. If I set log-level to INFO -- I get much less 502s, but still get them very consistently, e.g. first load is almost always a 502, a consecutive load is almost always a 200, but then when connection times out in the log (`01/Apr/2016:10:50:29 +0300 PID86810 [INFO] shrpx_http_downstream_connection.cc:527 [DCONN:0x7fa29a702070] Idle connection timeout`) -- the next request is almost always a 502.\r\n\r\nMost often the error in the log is this:\r\n`01/Apr/2016:10:58:29 +0300 PID87318 [INFO] shrpx_http2_upstream.cc:1099 [DCONN:0x7fde6250ca90] Downstream network/general error`\r\n\r\nAnd sometimes it's this one:\r\n`01/Apr/2016:10:32:24 +0300 PID85467 [INFO] shrpx_https_upstream.cc:780 [DCONN:0x7fb778c1dad0] Network error/general error`\r\n\r\nAm I doing something wrong?\r\n\r\nEnvironment:\r\nOSX El Capitan 10.11.3, nghttpx nghttp2/1.9.1\r\n\r\nCommand:\r\n`nghttpx --conf nghttpx.conf`\r\n\r\nConfig:\r\n```\r\nfrontend=127.0.0.1,443\r\nbackend=127.0.0.1,80\r\ncacert=server.csr\r\nprivate-key-file=server.key\r\ncertificate-file=server.crt\r\nadd-x-forwarded-for=yes\r\nno-via=yes\r\nno-ocsp=yes\r\ninsecure=yes\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nghttp2/nghttp2/issues/comments/214000382","html_url":"https://github.com/nghttp2/nghttp2/issues/563#issuecomment-214000382","issue_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/563","id":214000382,"user":{"login":"bsuh","id":47231,"avatar_url":"https://avatars.githubusercontent.com/u/47231?v=3","gravatar_id":"","url":"https://api.github.com/users/bsuh","html_url":"https://github.com/bsuh","followers_url":"https://api.github.com/users/bsuh/followers","following_url":"https://api.github.com/users/bsuh/following{/other_user}","gists_url":"https://api.github.com/users/bsuh/gists{/gist_id}","starred_url":"https://api.github.com/users/bsuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsuh/subscriptions","organizations_url":"https://api.github.com/users/bsuh/orgs","repos_url":"https://api.github.com/users/bsuh/repos","events_url":"https://api.github.com/users/bsuh/events{/privacy}","received_events_url":"https://api.github.com/users/bsuh/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T16:51:58Z","updated_at":"2016-04-24T16:51:58Z","body":"Able to trigger error using dtruss\r\n```\r\n 19246/100087:  socket(0x2, 0x30000001, 0x0)\t\t = 12 0\r\n 19246/100087:  setsockopt(0xC, 0x6, 0x1)\t\t = 0 0\r\n 19246/100087:  connect(0xC, 0x803495B48, 0x10)\t\t = -1 Err#36\r\n 19246/100087:  read(0x7, \"\\0\", 0x5)\t\t = -1 Err#35\r\n 19246/100087:  getsockopt(0xC, 0xFFFF, 0x1007)\t\t = 0 0\r\n 19246/100087:  writev(0xC, 0x7FFFFFFFAAF8, 0x1)\t\t = -1 Err#57\r\n 19246/100087:  gettimeofday(0x7FFFFFFFA930, 0x0, 0x0)\t\t = 0 0\r\n 19246/100087:  shutdown(0xC, 0x1, 0x0)\t\t = 0 0\r\n 19246/100087:  close(0xC)\t\t = 0 0\r\n 19246/100087:  clock_gettime(0x4, 0x7FFFFFFFAC70, 0x0)\t\t = 0 0\r\n 19246/100087:  kevent(0x9, 0x803420A80, 0x3)\t\t = 1 0\r\n 19246/100087:  clock_gettime(0x4, 0x7FFFFFFFAC70, 0x0)\t\t = 0 0\r\n 19246/100087:  getpid(0x0, 0x0, 0x0)\t\t = 19246 0\r\n 19246/100087:  write(0x7, \"\\027\\003\\003\\001\\200m=j\\221Lz\\362Y/}\\241\\275F\\302\\233\\006N\\\\\\204\\027\\372\\211\\272\\246\\020N\\310\\320\\363_v\\020L\\003\\302I\\214\\325k\\026h\\364_\\275\\322\\207\\337\\212\\321\\222\\310\\203\\3524\\233+\\323\\375#\\037\\377 \\034\\351i\\034\\337?\\031\\330\\b\\210\\320\\033\\211\\036\\02008\\362E\\202\\341fI\\350b|5\\231\\225\\202\\004\\317\\267@8\\361\\203\\247\\330hR\\\\\\v\\003/^\\245\\032\\220\\210\\036\\217\\267;\\2446\\207\\365\\022\\033Z\\203\\302P\\375K\\363A\\367\\377\\356t\\334B\\0178\\375\\342\\262kw|\\333\\355+>\\315\\262\\350\\320\\341\\226>{ \\316\\256\\237\\311\\227\\265\\027\\\"1A\\3111\\373\\343\\310\\377\\276?h)\\200+\\226,\\357%\\262\\333HK\\317\\314:[\\221,.\\343FJ\\345\\210\\322j\\364\\362~\\252\\v\\344\\r\\374#\\330:H\\334)\\021\\254\\377\\232\\026\\vx\\300\\025~Nb\\362\\241\\241\\362\\244\\204\\343\\205$\\311&\\\"\\203\\232:\\361\\333J4\\032p\\274\\177>\", 0x185)\t\t = 389 0\r\n 19246/100087:  gettimeofday(0x7FFFFFFFAAD0, 0x0, 0x0)\t\t = 0 0\r\n 19246/100087:  clock_gettime(0x4, 0x7FFFFFFFAAD0, 0x0)\t\t = 0 0\r\n 19246/100087:  getpid(0x0, 0x0, 0x0)\t\t = 19246 0\r\n 19246/100087:  write(0x7, \"\\025\\003\\003\\0\", 0x45)\t\t = 69 0\r\n 19246/100087:  shutdown(0x7, 0x1, 0x0)\t\t = 0 0\r\n 19246/100087:  close(0x7)\t\t = 0 0\r\n 19246/100087:  clock_gettime(0x4, 0x7FFFFFFFAC70, 0x0)\t\t = 0 0\r\n 19246/100087:  kevent(0x9, 0x803420A80, 0x2)\t\t = 2 0\r\n 19246/100087:  clock_gettime(0x4, 0x7FFFFFFFAC70, 0x0)\t\t = 0 0\r\n```"}}