{"action":"created","issue":{"url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/344","labels_url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/344/comments","events_url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/344/events","html_url":"https://github.com/JustinTulloss/zeromq.node/issues/344","id":41316363,"number":344,"title":"Issue with 'remove receive message delayed handling' commit","user":{"login":"prdn","id":3747053,"avatar_url":"https://avatars.githubusercontent.com/u/3747053?v=3","gravatar_id":"","url":"https://api.github.com/users/prdn","html_url":"https://github.com/prdn","followers_url":"https://api.github.com/users/prdn/followers","following_url":"https://api.github.com/users/prdn/following{/other_user}","gists_url":"https://api.github.com/users/prdn/gists{/gist_id}","starred_url":"https://api.github.com/users/prdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prdn/subscriptions","organizations_url":"https://api.github.com/users/prdn/orgs","repos_url":"https://api.github.com/users/prdn/repos","events_url":"https://api.github.com/users/prdn/events{/privacy}","received_events_url":"https://api.github.com/users/prdn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-08-27T18:40:14Z","updated_at":"2015-05-06T17:40:55Z","closed_at":null,"body":"Hi,\r\n\r\nregarding the issue #338 \r\n\r\nthis commit is causing the issue below:\r\nAssertion failed: (!handle.IsEmpty()), function Unwrap, file ../src/node_object_wrap.h, line 60\r\nIt happens when I'm pushing a lot of messages in the queue (1000 or more).\r\n\r\nI have tested it on OSX and Linux and the result is the same.\r\n\r\nAnyone has the same problem?\r\nI think it should be reverted to the original.\r\n\r\nThank you\r\nPaolo"},"comment":{"url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/comments/99548019","html_url":"https://github.com/JustinTulloss/zeromq.node/issues/344#issuecomment-99548019","issue_url":"https://api.github.com/repos/JustinTulloss/zeromq.node/issues/344","id":99548019,"user":{"login":"sbisbee","id":81002,"avatar_url":"https://avatars.githubusercontent.com/u/81002?v=3","gravatar_id":"","url":"https://api.github.com/users/sbisbee","html_url":"https://github.com/sbisbee","followers_url":"https://api.github.com/users/sbisbee/followers","following_url":"https://api.github.com/users/sbisbee/following{/other_user}","gists_url":"https://api.github.com/users/sbisbee/gists{/gist_id}","starred_url":"https://api.github.com/users/sbisbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbisbee/subscriptions","organizations_url":"https://api.github.com/users/sbisbee/orgs","repos_url":"https://api.github.com/users/sbisbee/repos","events_url":"https://api.github.com/users/sbisbee/events{/privacy}","received_events_url":"https://api.github.com/users/sbisbee/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T17:40:55Z","updated_at":"2015-05-06T17:40:55Z","body":"I have run into this memory leak as well and am also locked into node 0.10 for now. It's probably worth noting that we saw this issue even with 1,000s of messages, not 10,000s.\r\n\r\nI patched our production system to use this code block from an older version, modified to properly use `this` instead of `self`.\r\n\r\n```javascript\r\n(function(emitArgs) {\r\n  setImmediate(function() {\r\n    this.emit.apply(this, emitArgs);\r\n  }.bind(this));\r\n}.bind(this))(emitArgs);\r\n```\r\n\r\nIt looks like this code was introduced in 2.5.1 and continued to live in 2.6.0, but was changed in 2.7.0.\r\n\r\nFor those still running node 0.10 with this library I'd recommend pinning your dependency to 2.6.0. Our process is staying at <5% memory now instead of leaking and OOM'ing within 5 minutes, with this being the only change.\r\n\r\nConfirmed Broken: >=2.7.0\r\nConfirmed Works: 2.5.1, 2.6.0\r\nNode: 0.10.33"}}