How to enable grpc java logs?

瀏覽次數:2,998 次
跳到第一則未讀訊息

deepakag...@gmail.com

未讀,
2018年4月12日 上午9:10:322018/4/12
收件者:grpc.io
Hi all,
I have a grpc java server, I have provide a fixed threadpool executor with 5 threads while starting my grpc server.
The client is sending 5000 GPB packets per second. But my application is not able to receive those packets within
one second.

So my doubts are
1) How can i check where the packets are stuck. If there is any queue where the packets are cached and how to know,
 how many packets are cached in the queue?
2) How to enable the GRPC java server logs?

Regards,
Deepak





deepakag...@gmail.com

未讀,
2018年4月12日 上午9:15:122018/4/12
收件者:grpc.io
Adding some more information.
The RPC is a BiDirectional streaming RPC

Carl Mastrangelo

未讀,
2018年4月12日 下午4:52:482018/4/12
收件者:grpc.io
Are you setting the executor on the channel and server?   

gRPC Java does all its logging via java.util.logging, so you can turn up the verbosity in the log config.

deepakag...@gmail.com

未讀,
2018年4月13日 凌晨12:18:222018/4/13
收件者:grpc.io
Hi Carl,
 I am setting it on server, i am using nettyserverbuilder to build the server
Server = NettyServerBuilder.forAddress().sslContext().executor(MyExecutor).addService().build()

Carl Mastrangelo

未讀,
2018年4月18日 下午2:13:572018/4/18
收件者:grpc.io
This is correct.  Like I mentioned, you will need to turn up the log level for gRPC classes.  gRPC uses java.util.Logging, so you'll need to set it via that. (There are lots of ways to do this, so I can't advise on which way is right for you.)
回覆所有人
回覆作者
轉寄
訊息已遭刪除
0 則新訊息