{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/3319","labels_url":"https://api.github.com/repos/netty/netty/issues/3319/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/3319/comments","events_url":"https://api.github.com/repos/netty/netty/issues/3319/events","html_url":"https://github.com/netty/netty/issues/3319","id":53961417,"number":3319,"title":"Direct memory exhausted after cant recycle any FastThreadLocalThreads","user":{"login":"jiangguilong2000","id":5009933,"avatar_url":"https://avatars.githubusercontent.com/u/5009933?v=3","gravatar_id":"","url":"https://api.github.com/users/jiangguilong2000","html_url":"https://github.com/jiangguilong2000","followers_url":"https://api.github.com/users/jiangguilong2000/followers","following_url":"https://api.github.com/users/jiangguilong2000/following{/other_user}","gists_url":"https://api.github.com/users/jiangguilong2000/gists{/gist_id}","starred_url":"https://api.github.com/users/jiangguilong2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiangguilong2000/subscriptions","organizations_url":"https://api.github.com/users/jiangguilong2000/orgs","repos_url":"https://api.github.com/users/jiangguilong2000/repos","events_url":"https://api.github.com/users/jiangguilong2000/events{/privacy}","received_events_url":"https://api.github.com/users/jiangguilong2000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/needs%20info","name":"needs info","color":"e6e6e6"}],"state":"open","locked":false,"assignee":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"milestone":null,"comments":49,"created_at":"2015-01-10T15:32:59Z","updated_at":"2015-08-25T09:37:35Z","closed_at":null,"body":"Version:netty-all-4.0.25.Final\r\nUsing:PooledByteBufAllocator\r\nI have encounter a problem that direct memory keeps rising by increasing 16M per time when load average  go up till direct memory having  2G uplimit is exhausted ,and crashed.\r\nI find there are mass of FastThreadLocalThreads  and io.netty.util.Recycler$DefaultHandle \r\nmy code configed as follows:\r\n\r\n![code](https://cloud.githubusercontent.com/assets/5009933/5692220/4c4afe6e-9927-11e4-9a46-763427f0c485.jpg)\r\n\r\n![chart4](https://cloud.githubusercontent.com/assets/5009933/5692081/bd7aeeca-9920-11e4-9e68-b59dd2105a45.png)\r\n![f0 u hb nmzhp62ht b b75](https://cloud.githubusercontent.com/assets/5009933/5692083/c76382ee-9920-11e4-80be-8ed8c55f4991.png)\r\n\r\n![chart6](https://cloud.githubusercontent.com/assets/5009933/5692172/386641bc-9925-11e4-93a1-c352107e8eac.png)\r\n\r\n\r\n\r\nwhat's wrong with my using netty? can any one help me? "},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/134539952","html_url":"https://github.com/netty/netty/issues/3319#issuecomment-134539952","issue_url":"https://api.github.com/repos/netty/netty/issues/3319","id":134539952,"user":{"login":"caipanjin","id":3931875,"avatar_url":"https://avatars.githubusercontent.com/u/3931875?v=3","gravatar_id":"","url":"https://api.github.com/users/caipanjin","html_url":"https://github.com/caipanjin","followers_url":"https://api.github.com/users/caipanjin/followers","following_url":"https://api.github.com/users/caipanjin/following{/other_user}","gists_url":"https://api.github.com/users/caipanjin/gists{/gist_id}","starred_url":"https://api.github.com/users/caipanjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caipanjin/subscriptions","organizations_url":"https://api.github.com/users/caipanjin/orgs","repos_url":"https://api.github.com/users/caipanjin/repos","events_url":"https://api.github.com/users/caipanjin/events{/privacy}","received_events_url":"https://api.github.com/users/caipanjin/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T09:37:35Z","updated_at":"2015-08-25T09:37:35Z","body":"@normanmaurer Is that means calling channel.writeAndFlush(msg) directly is not correct to avoid this situation? BTW, is calling the same method in ChannelHandlerContext needs to do the same thing?"}}