{"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":{"url":"https://api.github.com/repos/netty/netty/milestones/125","html_url":"https://github.com/netty/netty/milestones/4.0.32.Final","labels_url":"https://api.github.com/repos/netty/netty/milestones/125/labels","id":1278111,"number":125,"title":"4.0.32.Final","description":"","creator":{"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},"open_issues":57,"closed_issues":0,"state":"open","created_at":"2015-08-28T18:52:00Z","updated_at":"2015-08-28T18:59:00Z","due_on":null,"closed_at":null},"comments":52,"created_at":"2015-01-10T15:32:59Z","updated_at":"2015-08-30T04:50:59Z","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/136084899","html_url":"https://github.com/netty/netty/issues/3319#issuecomment-136084899","issue_url":"https://api.github.com/repos/netty/netty/issues/3319","id":136084899,"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},"created_at":"2015-08-30T04:50:59Z","updated_at":"2015-08-30T04:50:59Z","body":"@caipanjin I think what you meet is that I met,anyway,the count of WriteAndFlushTask and DefaultHandle in heap is still increased whatever the pressure is very tiny.\r\n\r\npls see my another comment as follows\r\n\"here is the log after some players playing game.I find out some problem,\r\nfor instance.at 13:35:33~13:35:34 ,that Moment 140 numbers of io.netty.util.Recycler$DefaultHandle been created suddenly,\r\nand then at next some point,other massive numbers of  io.netty.util.Recycler$DefaultHandle been created again. ...at last ,the capicity up to max value 262144, I think this performance lead to stack to be full,but I don't know what cause to it and how to reproduce it.\"\r\n\r\nI think the solution is follows:\r\n1.fix the bug @trustin ,@normanmaurer, @Scottmitch @tea-dragon\r\n2.set the value about -Dio.netty.recycler.maxCapacity not using the default value. @ninja-\r\n3.the reason maybe the server side write so  fast that the client can't consume the data? \r\n4.I don't think that's is a good idea about \"Provide a way to disable recycling completely #4147\""}}