{"action":"created","issue":{"url":"https://api.github.com/repos/celluloid/celluloid/issues/670","labels_url":"https://api.github.com/repos/celluloid/celluloid/issues/670/labels{/name}","comments_url":"https://api.github.com/repos/celluloid/celluloid/issues/670/comments","events_url":"https://api.github.com/repos/celluloid/celluloid/issues/670/events","html_url":"https://github.com/celluloid/celluloid/issues/670","id":104159543,"number":670,"title":"Memory Leak using Celluloid::Future","user":{"login":"hstrowd","id":420039,"avatar_url":"https://avatars.githubusercontent.com/u/420039?v=3","gravatar_id":"","url":"https://api.github.com/users/hstrowd","html_url":"https://github.com/hstrowd","followers_url":"https://api.github.com/users/hstrowd/followers","following_url":"https://api.github.com/users/hstrowd/following{/other_user}","gists_url":"https://api.github.com/users/hstrowd/gists{/gist_id}","starred_url":"https://api.github.com/users/hstrowd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hstrowd/subscriptions","organizations_url":"https://api.github.com/users/hstrowd/orgs","repos_url":"https://api.github.com/users/hstrowd/repos","events_url":"https://api.github.com/users/hstrowd/events{/privacy}","received_events_url":"https://api.github.com/users/hstrowd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-01T00:30:52Z","updated_at":"2015-09-18T09:26:01Z","closed_at":null,"body":"I am using `Celluloid::Future` to kick off tasks and delay their execution until the result is requested. In version 0.17.0, I am finding that this is resulting in an apparent memory leak. Each call I run appears to create a new thread in the `Celluloid.actor_system.group.group` array. The `Celluloid::Group::Spawner` appears to never clean up the completed Threads that it creates.\r\n\r\nAs a work around, I am planing to instead configure my applications to use the `Celluloid::Group::Pool` group class which appears to support proper thread pooling. However in digging through this, I noticed a very aggressive warning at the top of this file (https://github.com/celluloid/celluloid/blob/master/lib/celluloid/group/pool.rb#L6), which raised a healthy level of concern for me. Don't hesitate to let me know if there is an alternative way to work around this instead. Thanks."},"comment":{"url":"https://api.github.com/repos/celluloid/celluloid/issues/comments/141395736","html_url":"https://github.com/celluloid/celluloid/issues/670#issuecomment-141395736","issue_url":"https://api.github.com/repos/celluloid/celluloid/issues/670","id":141395736,"user":{"login":"kostya","id":95060,"avatar_url":"https://avatars.githubusercontent.com/u/95060?v=3","gravatar_id":"","url":"https://api.github.com/users/kostya","html_url":"https://github.com/kostya","followers_url":"https://api.github.com/users/kostya/followers","following_url":"https://api.github.com/users/kostya/following{/other_user}","gists_url":"https://api.github.com/users/kostya/gists{/gist_id}","starred_url":"https://api.github.com/users/kostya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kostya/subscriptions","organizations_url":"https://api.github.com/users/kostya/orgs","repos_url":"https://api.github.com/users/kostya/repos","events_url":"https://api.github.com/users/kostya/events{/privacy}","received_events_url":"https://api.github.com/users/kostya/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T09:26:01Z","updated_at":"2015-09-18T09:26:01Z","body":"i updated eye to 0.17 (https://github.com/kostya/eye/commit/408a42ead23599dddfc7504f887dbc90c6258b47), and now also experiencing memory leak in production usage.\r\n\r\nwith https://github.com/Vasfed/heap_dump i counting leaking objects:\r\nwhen process start it was 79Mb\r\n\r\nmain difference between objects:\r\n```\r\nCelluloid::Call::Sync: 520 \r\nCelluloid::Future: 261\r\nCelluloid::Future::Result: 261\r\nCelluloid::Internals::Response::Success: 520\r\nCelluloid::Internals::ThreadHandle: 550\r\n```\r\n\r\nafter 8hours, 440Mb\r\n```\r\nCelluloid::Call::Sync: 29384\r\nCelluloid::Future: 29178\r\nCelluloid::Future::Result: 29178\r\nCelluloid::Internals::Response::Success: 29384\r\nCelluloid::Internals::ThreadHandle: 29477\r\n```"}}