{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/2642","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/2642/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/2642/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/2642/events","html_url":"https://github.com/nodejs/node/issues/2642","id":104409082,"number":2642,"title":"Keep alive connection do not get closed with server.close()","user":{"login":"codygustafson","id":2645436,"avatar_url":"https://avatars.githubusercontent.com/u/2645436?v=3","gravatar_id":"","url":"https://api.github.com/users/codygustafson","html_url":"https://github.com/codygustafson","followers_url":"https://api.github.com/users/codygustafson/followers","following_url":"https://api.github.com/users/codygustafson/following{/other_user}","gists_url":"https://api.github.com/users/codygustafson/gists{/gist_id}","starred_url":"https://api.github.com/users/codygustafson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codygustafson/subscriptions","organizations_url":"https://api.github.com/users/codygustafson/orgs","repos_url":"https://api.github.com/users/codygustafson/repos","events_url":"https://api.github.com/users/codygustafson/events{/privacy}","received_events_url":"https://api.github.com/users/codygustafson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/http","name":"http","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2015-09-02T06:06:18Z","updated_at":"2016-06-30T18:50:44Z","closed_at":null,"body":"The following will remain open as long as the client makes a request within one second intervals making it possible that a server will never gracefully close. With the default of 2 minute timeouts a user or api client would need to stop traffic for two minutes before this will take affect. I propose closing sockets using keep alive immediately after the next request. This will prevent needing to keep track of everything that would need to be closed while making the maximum time to gracefully shutdown fixed(and finite).\r\n```javascript\r\nvar http = require('http');\r\n\r\nvar server = http.createServer(function(req, res) {\r\n  res.end('test\\n');\r\n  server.close()\r\n}).listen(8000, '127.0.0.1');\r\nserver.setTimeout(1000);\r\n```"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/229753639","html_url":"https://github.com/nodejs/node/issues/2642#issuecomment-229753639","issue_url":"https://api.github.com/repos/nodejs/node/issues/2642","id":229753639,"user":{"login":"greenboxal","id":1245785,"avatar_url":"https://avatars.githubusercontent.com/u/1245785?v=3","gravatar_id":"","url":"https://api.github.com/users/greenboxal","html_url":"https://github.com/greenboxal","followers_url":"https://api.github.com/users/greenboxal/followers","following_url":"https://api.github.com/users/greenboxal/following{/other_user}","gists_url":"https://api.github.com/users/greenboxal/gists{/gist_id}","starred_url":"https://api.github.com/users/greenboxal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenboxal/subscriptions","organizations_url":"https://api.github.com/users/greenboxal/orgs","repos_url":"https://api.github.com/users/greenboxal/repos","events_url":"https://api.github.com/users/greenboxal/events{/privacy}","received_events_url":"https://api.github.com/users/greenboxal/received_events","type":"User","site_admin":false},"created_at":"2016-06-30T18:50:44Z","updated_at":"2016-06-30T18:50:44Z","body":"Just a quick note, the problem is even worse when using the cluster module.\r\n\r\nAs `disconnect` is called in `cluster.js` it waits til all servers close. When using keep alive connections(e.g.: AWS Load Balancer), this never occurs as although the server socket is closed, keep alive client sockets never are.\r\n\r\nThis causes our workers to never restart using a cluster process manager like PM2."}}
{"actor":{"display_login":"greenboxal"}}