{"action":"created","issue":{"url":"https://api.github.com/repos/phusion/passenger/issues/1364","labels_url":"https://api.github.com/repos/phusion/passenger/issues/1364/labels{/name}","comments_url":"https://api.github.com/repos/phusion/passenger/issues/1364/comments","events_url":"https://api.github.com/repos/phusion/passenger/issues/1364/events","html_url":"https://github.com/phusion/passenger/issues/1364","id":56137927,"number":1364,"title":"Frequent 502 Errors with parsing application response header","user":{"login":"rickypai","id":1469579,"avatar_url":"https://avatars.githubusercontent.com/u/1469579?v=3","gravatar_id":"","url":"https://api.github.com/users/rickypai","html_url":"https://github.com/rickypai","followers_url":"https://api.github.com/users/rickypai/followers","following_url":"https://api.github.com/users/rickypai/following{/other_user}","gists_url":"https://api.github.com/users/rickypai/gists{/gist_id}","starred_url":"https://api.github.com/users/rickypai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickypai/subscriptions","organizations_url":"https://api.github.com/users/rickypai/orgs","repos_url":"https://api.github.com/users/rickypai/repos","events_url":"https://api.github.com/users/rickypai/events{/privacy}","received_events_url":"https://api.github.com/users/rickypai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phusion/passenger/labels/NeedsFeedback","name":"NeedsFeedback","color":"bfd4f2"},{"url":"https://api.github.com/repos/phusion/passenger/labels/Priority/Critical","name":"Priority/Critical","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/phusion/passenger/milestones/19","labels_url":"https://api.github.com/repos/phusion/passenger/milestones/19/labels","id":971930,"number":19,"title":"5.0.1","description":"","creator":{"login":"FooBarWidget","id":819,"avatar_url":"https://avatars.githubusercontent.com/u/819?v=3","gravatar_id":"","url":"https://api.github.com/users/FooBarWidget","html_url":"https://github.com/FooBarWidget","followers_url":"https://api.github.com/users/FooBarWidget/followers","following_url":"https://api.github.com/users/FooBarWidget/following{/other_user}","gists_url":"https://api.github.com/users/FooBarWidget/gists{/gist_id}","starred_url":"https://api.github.com/users/FooBarWidget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FooBarWidget/subscriptions","organizations_url":"https://api.github.com/users/FooBarWidget/orgs","repos_url":"https://api.github.com/users/FooBarWidget/repos","events_url":"https://api.github.com/users/FooBarWidget/events{/privacy}","received_events_url":"https://api.github.com/users/FooBarWidget/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2015-02-09T15:42:37Z","updated_at":"2015-02-20T17:40:20Z","due_on":"2015-02-25T23:00:00Z","closed_at":null},"comments":12,"created_at":"2015-01-31T20:23:44Z","updated_at":"2015-02-23T17:17:57Z","closed_at":null,"body":"Hi, I'm currently trying out 5.0.0.beta2 on Rails 4.2.0/Ruby 2.1.2 on heroku with the workaround in #1329 \r\n\r\nProcfile:\r\n```web: bundle exec passenger start -p $PORT --engine=nginx```\r\n\r\nWhen making some get requests, the response often returns 502 while the same requests can yield 200.\r\n\r\nIt seems like in some requests, there are problems parsing the application response header, while it would still subsequently fire a request to the rails stack and yield a 200.\r\n```agents/HelperAgent/RequestHandler/ForwardResponse.cpp:99 ]: [Client 1.6] Error parsing application response header: invalid constant string```\r\n\r\nAttached is the full log:\r\n```\r\n2015-01-31T20:13:52.211750+00:00 heroku[router]: at=info method=GET path=\"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" host=---.com request_id=359d5b51-6d2b-4371-ba92-43c2c66185b0 fwd=\"70.36.236.249\" dyno=web.1 connect=1ms service=215ms status=200 bytes=972\r\n2015-01-31T20:13:52.420211+00:00 app[web.1]: App 126 stdout: Started GET \"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" for 70.36.236.249 at 2015-01-31 20:13:52 +0000\r\n2015-01-31T20:13:52.420222+00:00 app[web.1]: App 126 stdout: Processing by ToursController#purge as HTML\r\n2015-01-31T20:13:52.420224+00:00 app[web.1]: App 126 stdout:   Parameters: {\"id\"=>\"3a3cb486c3746ab7e1f4ffa06f46b16b546f7572\"}\r\n2015-01-31T20:13:52.420226+00:00 app[web.1]: App 126 stdout:   Rendered text template (0.0ms)\r\n2015-01-31T20:13:52.420227+00:00 app[web.1]: App 126 stdout: Completed 200 OK in 160ms (Views: 0.5ms | ActiveRecord: 44.6ms)\r\n2015-01-31T20:13:55.151276+00:00 heroku[router]: at=info method=GET path=\"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" host=---.com request_id=8a8c41b5-79da-4f55-a4e6-5651fe994990 fwd=\"70.36.236.249\" dyno=web.1 connect=1ms service=5ms status=502 bytes=296\r\n2015-01-31T20:13:55.424040+00:00 app[web.1]: [ 2015-01-31 20:13:55.1597 72/7f85d5c2f700 agents/HelperAgent/RequestHandler/ForwardResponse.cpp:99 ]: [Client 3.5] Error parsing application response header: invalid constant string\r\n2015-01-31T20:13:55.424052+00:00 app[web.1]: App 126 stdout: Started GET \"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" for 70.36.236.249 at 2015-01-31 20:13:55 +0000\r\n2015-01-31T20:13:55.424054+00:00 app[web.1]: App 126 stdout: Processing by ToursController#purge as HTML\r\n2015-01-31T20:13:55.424056+00:00 app[web.1]: App 126 stdout:   Parameters: {\"id\"=>\"3a3cb486c3746ab7e1f4ffa06f46b16b546f7572\"}\r\n2015-01-31T20:13:55.424058+00:00 app[web.1]: App 126 stdout:   Rendered text template (0.0ms)\r\n2015-01-31T20:13:55.424059+00:00 app[web.1]: App 126 stdout: Completed 200 OK in 92ms (Views: 0.6ms | ActiveRecord: 18.5ms)\r\n2015-01-31T20:13:55.995738+00:00 heroku[router]: at=info method=GET path=\"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" host=---.com request_id=a68082c4-ca6f-4a26-96ad-492faf2e3943 fwd=\"70.36.236.249\" dyno=web.1 connect=0ms service=221ms status=200 bytes=972\r\n2015-01-31T20:13:56.431858+00:00 app[web.1]: App 126 stdout: Started GET \"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" for 70.36.236.249 at 2015-01-31 20:13:55 +0000\r\n2015-01-31T20:13:56.431863+00:00 app[web.1]: App 126 stdout: Processing by ToursController#purge as HTML\r\n2015-01-31T20:13:56.431871+00:00 app[web.1]: App 126 stdout:   Parameters: {\"id\"=>\"3a3cb486c3746ab7e1f4ffa06f46b16b546f7572\"}\r\n2015-01-31T20:13:56.431872+00:00 app[web.1]: App 126 stdout:   Rendered text template (0.0ms)\r\n2015-01-31T20:13:56.431874+00:00 app[web.1]: App 126 stdout: Completed 200 OK in 169ms (Views: 0.6ms | ActiveRecord: 63.3ms)\r\n2015-01-31T20:14:40.271824+00:00 heroku[router]: at=info method=GET path=\"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" host=---.com request_id=d4c0903a-3352-4007-8f60-744dd1f7afef fwd=\"70.36.236.249\" dyno=web.1 connect=1ms service=2ms status=502 bytes=296\r\n2015-01-31T20:14:40.543882+00:00 app[web.1]: [ 2015-01-31 20:14:40.2796 72/7f85d7c31700 agents/HelperAgent/RequestHandler/ForwardResponse.cpp:99 ]: [Client 1.6] Error parsing application response header: invalid constant string\r\n2015-01-31T20:14:40.543892+00:00 app[web.1]: App 126 stdout: Started GET \"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" for 70.36.236.249 at 2015-01-31 20:14:40 +0000\r\n2015-01-31T20:14:40.543894+00:00 app[web.1]: App 126 stdout: Processing by ToursController#purge as HTML\r\n2015-01-31T20:14:40.543895+00:00 app[web.1]: App 126 stdout:   Parameters: {\"id\"=>\"3a3cb486c3746ab7e1f4ffa06f46b16b546f7572\"}\r\n2015-01-31T20:14:40.543897+00:00 app[web.1]: App 126 stdout:   Rendered text template (0.0ms)\r\n2015-01-31T20:14:40.543898+00:00 app[web.1]: App 126 stdout: Completed 200 OK in 84ms (Views: 0.5ms | ActiveRecord: 15.5ms)\r\n2015-01-31T20:14:41.067323+00:00 heroku[router]: at=info method=GET path=\"/favicon.ico\" host=---.com request_id=0073833f-7921-409d-8b3b-4d6e9584af0f fwd=\"70.36.236.249\" dyno=web.1 connect=0ms service=2ms status=304 bytes=172\r\n2015-01-31T20:14:42.546294+00:00 app[web.1]: [ 2015-01-31 20:14:41.8841 72/7f85da16e700 agents/HelperAgent/Main.cpp:722 ]: Disconnecting long-running connections for process 133, application /app/public (staging)#default\r\n2015-01-31T20:14:43.143309+00:00 heroku[router]: at=info method=GET path=\"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" host=---.com request_id=f5b27714-b869-4081-a64c-cbb4e6bfac45 fwd=\"70.36.236.249\" dyno=web.1 connect=1ms service=101ms status=200 bytes=972\r\n2015-01-31T20:14:43.547873+00:00 app[web.1]: App 126 stdout: Started GET \"/tours/3a3cb486c3746ab7e1f4ffa06f46b16b546f7572/purge\" for 70.36.236.249 at 2015-01-31 20:14:43 +0000\r\n2015-01-31T20:14:43.547879+00:00 app[web.1]: App 126 stdout: Processing by ToursController#purge as HTML\r\n2015-01-31T20:14:43.547886+00:00 app[web.1]: App 126 stdout:   Parameters: {\"id\"=>\"3a3cb486c3746ab7e1f4ffa06f46b16b546f7572\"}\r\n2015-01-31T20:14:43.547888+00:00 app[web.1]: App 126 stdout:   Rendered text template (0.0ms)\r\n2015-01-31T20:14:43.547889+00:00 app[web.1]: App 126 stdout: Completed 200 OK in 47ms (Views: 0.6ms | ActiveRecord: 6.8ms)\r\n```\r\n\r\nthanks a lot and let me know if there's other information I can provide."},"comment":{"url":"https://api.github.com/repos/phusion/passenger/issues/comments/75587358","html_url":"https://github.com/phusion/passenger/issues/1364#issuecomment-75587358","issue_url":"https://api.github.com/repos/phusion/passenger/issues/1364","id":75587358,"user":{"login":"FooBarWidget","id":819,"avatar_url":"https://avatars.githubusercontent.com/u/819?v=3","gravatar_id":"","url":"https://api.github.com/users/FooBarWidget","html_url":"https://github.com/FooBarWidget","followers_url":"https://api.github.com/users/FooBarWidget/followers","following_url":"https://api.github.com/users/FooBarWidget/following{/other_user}","gists_url":"https://api.github.com/users/FooBarWidget/gists{/gist_id}","starred_url":"https://api.github.com/users/FooBarWidget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FooBarWidget/subscriptions","organizations_url":"https://api.github.com/users/FooBarWidget/orgs","repos_url":"https://api.github.com/users/FooBarWidget/repos","events_url":"https://api.github.com/users/FooBarWidget/events{/privacy}","received_events_url":"https://api.github.com/users/FooBarWidget/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T17:17:57Z","updated_at":"2015-02-23T17:17:57Z","body":"Any luck so far?"}}