{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc-java/issues/2424","repository_url":"https://api.github.com/repos/grpc/grpc-java","labels_url":"https://api.github.com/repos/grpc/grpc-java/issues/2424/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc-java/issues/2424/comments","events_url":"https://api.github.com/repos/grpc/grpc-java/issues/2424/events","html_url":"https://github.com/grpc/grpc-java/issues/2424","id":189705560,"number":2424,"title":"gRPC stream client OutOfDirectMemoryError, when send ton of data","user":{"login":"wu-sheng","id":5441976,"avatar_url":"https://avatars.githubusercontent.com/u/5441976?v=3","gravatar_id":"","url":"https://api.github.com/users/wu-sheng","html_url":"https://github.com/wu-sheng","followers_url":"https://api.github.com/users/wu-sheng/followers","following_url":"https://api.github.com/users/wu-sheng/following{/other_user}","gists_url":"https://api.github.com/users/wu-sheng/gists{/gist_id}","starred_url":"https://api.github.com/users/wu-sheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wu-sheng/subscriptions","organizations_url":"https://api.github.com/users/wu-sheng/orgs","repos_url":"https://api.github.com/users/wu-sheng/repos","events_url":"https://api.github.com/users/wu-sheng/events{/privacy}","received_events_url":"https://api.github.com/users/wu-sheng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"assignees":[{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/grpc/grpc-java/milestones/8","html_url":"https://github.com/grpc/grpc-java/milestones/Unscheduled","labels_url":"https://api.github.com/repos/grpc/grpc-java/milestones/8/labels","id":1438152,"number":8,"title":"Unscheduled","description":"Triaged issues that aren't to be tracked in a soon milestone. Each release, issues may be reassigned from this milestone as they are planned to be addressed.","creator":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"open_issues":96,"closed_issues":0,"state":"open","created_at":"2015-12-01T19:14:05Z","updated_at":"2016-11-21T22:39:56Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-11-16T13:35:51Z","updated_at":"2016-11-22T07:45:27Z","closed_at":null,"body":"Please answer these questions before submitting your issue.\r\n\r\n### What version of gRPC are you using?\r\n1.0.1\r\n\r\n### What JVM are you using (`java -version`)?\r\n1.8\r\n\r\n### What did you do?\r\nIf possible, provide a recipe for reproducing the error.\r\nNetty OutOfDirectMemoryError\r\n\r\n### What did you expect to see?\r\nsend data as quickly as possible\r\n\r\n### What did you see instead?\r\nnot to trigger OutOfDirectMemoryError\r\n\r\nref issue: #2247 \r\n\r\ntest case:\r\n```java\r\nfor (int i = 0; i < 1000000; i++) {\r\n            StreamObserver<RequestSpan> requestSpanStreamObserver =\r\n                    spanStorageServiceStub.storageRequestSpan(new StreamObserver<SendResult>() {\r\n                        @Override\r\n                        public void onNext(SendResult sendResult) {\r\n\r\n                        }\r\n\r\n                        @Override\r\n                        public void onError(Throwable throwable) {\r\n                            throwable.printStackTrace();\r\n                        }\r\n\r\n                        @Override\r\n                        public void onCompleted() {\r\n                            endTime2 = System.currentTimeMillis();\r\n                        }\r\n                    });\r\n            for (int j = 0; j < 10; j++) {\r\n                requestSpanStreamObserver.onNext(requestSpan);\r\n            }\r\n\r\n            ClientCallStreamObserver<RequestSpan> newRequestSpanStreamObserver =\r\n                    (ClientCallStreamObserver<RequestSpan>) requestSpanStreamObserver;\r\n\r\n            while (!newRequestSpanStreamObserver.isReady()) {\r\n                Thread.sleep(1);\r\n            }\r\n\r\n            ackSpanStreamObserver.onCompleted();\r\n            requestSpanStreamObserver.onCompleted();\r\n```\r\n\r\nThis single thread code send ton of data to server,  casue OutOfDirectMemoryError. more discussion detail, see the ref issue #2247 \r\n"},"comment":{"url":"https://api.github.com/repos/grpc/grpc-java/issues/comments/262169890","html_url":"https://github.com/grpc/grpc-java/issues/2424#issuecomment-262169890","issue_url":"https://api.github.com/repos/grpc/grpc-java/issues/2424","id":262169890,"user":{"login":"wu-sheng","id":5441976,"avatar_url":"https://avatars.githubusercontent.com/u/5441976?v=3","gravatar_id":"","url":"https://api.github.com/users/wu-sheng","html_url":"https://github.com/wu-sheng","followers_url":"https://api.github.com/users/wu-sheng/followers","following_url":"https://api.github.com/users/wu-sheng/following{/other_user}","gists_url":"https://api.github.com/users/wu-sheng/gists{/gist_id}","starred_url":"https://api.github.com/users/wu-sheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wu-sheng/subscriptions","organizations_url":"https://api.github.com/users/wu-sheng/orgs","repos_url":"https://api.github.com/users/wu-sheng/repos","events_url":"https://api.github.com/users/wu-sheng/events{/privacy}","received_events_url":"https://api.github.com/users/wu-sheng/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T07:45:27Z","updated_at":"2016-11-22T07:45:27Z","body":"I think this option is good enough for me. Looking for your release."}}
{"actor":{"display_login":"wu-sheng"}}