{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/node/issues/8931","labels_url":"https://api.github.com/repos/joyent/node/issues/8931/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/8931/comments","events_url":"https://api.github.com/repos/joyent/node/issues/8931/events","html_url":"https://github.com/joyent/node/issues/8931","id":52721047,"number":8931,"title":"How to debug memleaks in http and fs library caused by deoptimization?","user":{"login":"martensms","id":592637,"avatar_url":"https://avatars.githubusercontent.com/u/592637?v=3","gravatar_id":"","url":"https://api.github.com/users/martensms","html_url":"https://github.com/martensms","followers_url":"https://api.github.com/users/martensms/followers","following_url":"https://api.github.com/users/martensms/following{/other_user}","gists_url":"https://api.github.com/users/martensms/gists{/gist_id}","starred_url":"https://api.github.com/users/martensms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martensms/subscriptions","organizations_url":"https://api.github.com/users/martensms/orgs","repos_url":"https://api.github.com/users/martensms/repos","events_url":"https://api.github.com/users/martensms/events{/privacy}","received_events_url":"https://api.github.com/users/martensms/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-23T07:54:09Z","updated_at":"2015-06-25T17:55:19Z","closed_at":null,"body":"It seems as the http response methods have a memory leak and that's why my server clusters are being shut down by the kernel. How can I properly debug what exactly is leaking or if I'm mistaken?\r\n\r\nI have the heap snapshots laying around that indicate what is going on, but I have no idea what's going on internally in your javascript code. The snapshot indicates that the _storeHeader method (for example) is keeping references that GC can't trace and delete. It is a serious issue, because the lil' kilobytes per request sum up pretty fast and downtimes of servers cost money - and cronjobs for restarts are php-like solutions that I want to avoid.\r\n\r\nAlso, I think the EventEmitter leaks, but I'm not sure about that.\r\n\r\nLink to methods (please fill in missing):\r\nhttps://github.com/joyent/node/blob/master/lib/_http_outgoing.js#L191\r\n\r\nLink to screenshots of the snapshot:\r\nhttp://imgur.com/a/wQbvN"},"comment":{"url":"https://api.github.com/repos/joyent/node/issues/comments/115344207","html_url":"https://github.com/joyent/node/issues/8931#issuecomment-115344207","issue_url":"https://api.github.com/repos/joyent/node/issues/8931","id":115344207,"user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T17:55:19Z","updated_at":"2015-06-25T17:55:19Z","body":"@martensms ... is this still an issue for you? If so, are you able to provide a test case that reproduces the problem?"}}