{"action":"created","issue":{"url":"https://api.github.com/repos/phusion/passenger/issues/1257","repository_url":"https://api.github.com/repos/phusion/passenger","labels_url":"https://api.github.com/repos/phusion/passenger/issues/1257/labels{/name}","comments_url":"https://api.github.com/repos/phusion/passenger/issues/1257/comments","events_url":"https://api.github.com/repos/phusion/passenger/issues/1257/events","html_url":"https://github.com/phusion/passenger/issues/1257","id":39640052,"number":1257,"title":"Make Watchdog more resillient to out-of-memory conditions (was: No recovery from 502 Bad Gateway when PassengerWatchdog dies)","user":{"login":"JasonBarnabe","id":583995,"avatar_url":"https://avatars.githubusercontent.com/u/583995?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonBarnabe","html_url":"https://github.com/JasonBarnabe","followers_url":"https://api.github.com/users/JasonBarnabe/followers","following_url":"https://api.github.com/users/JasonBarnabe/following{/other_user}","gists_url":"https://api.github.com/users/JasonBarnabe/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonBarnabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonBarnabe/subscriptions","organizations_url":"https://api.github.com/users/JasonBarnabe/orgs","repos_url":"https://api.github.com/users/JasonBarnabe/repos","events_url":"https://api.github.com/users/JasonBarnabe/events{/privacy}","received_events_url":"https://api.github.com/users/JasonBarnabe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-08-06T16:32:52Z","updated_at":"2016-05-26T12:57:02Z","closed_at":null,"body":"Passenger 4.0.37\r\nnginx 1.4.4\r\n\r\nI've had a few situations recently where my server runs low on resources due to my Rails processes consuming too much. In some cases, this causes PassengerWatchdog to crash. When PassengerWatchdog crashes, it takes down the Rails processes with it, effectively fixing the low resource issue, but then nginx serves up 502 errors with this in the log:\r\n\r\n```\r\n2014/08/06 11:17:45 [error] 9455#0: *1 connect() to /tmp/passenger.1.0.9435/generation-0/request failed (111: Connection refused) while connecting to upstream, client: 1.2.3.4, server: example.com, request: \"GET / HTTP/1.1\", upstream: \"passenger:/tmp/passenger.1.0.9435/generation-0/request:\", host: \"example.com\"\r\n```\r\n\r\nnginx doesn't seem to be able to recover from this. My external monitoring of the nginx service doesn't see anything wrong, because nginx is still running. (I've since added monitoring for the Passenger processes.)\r\n\r\nI would like nginx to (attempt to) restart the Passenger processes if it sees none are running. If this is something that would be the nginx team's responsibility, let me know and I will file an issue with them."},"comment":{"url":"https://api.github.com/repos/phusion/passenger/issues/comments/221862957","html_url":"https://github.com/phusion/passenger/issues/1257#issuecomment-221862957","issue_url":"https://api.github.com/repos/phusion/passenger/issues/1257","id":221862957,"user":{"login":"CirrusThink","id":555037,"avatar_url":"https://avatars.githubusercontent.com/u/555037?v=3","gravatar_id":"","url":"https://api.github.com/users/CirrusThink","html_url":"https://github.com/CirrusThink","followers_url":"https://api.github.com/users/CirrusThink/followers","following_url":"https://api.github.com/users/CirrusThink/following{/other_user}","gists_url":"https://api.github.com/users/CirrusThink/gists{/gist_id}","starred_url":"https://api.github.com/users/CirrusThink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CirrusThink/subscriptions","organizations_url":"https://api.github.com/users/CirrusThink/orgs","repos_url":"https://api.github.com/users/CirrusThink/repos","events_url":"https://api.github.com/users/CirrusThink/events{/privacy}","received_events_url":"https://api.github.com/users/CirrusThink/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T12:57:02Z","updated_at":"2016-05-26T12:57:02Z","body":"We are seeing the same issue on 5.0.28, and all calls end up in 502 bad gateway"}}
{"actor":{"display_login":"CirrusThink"}}