How to enable grpc java logs?

2,990 views
Skip to first unread message

deepakag...@gmail.com

unread,
Apr 12, 2018, 9:10:32 AM4/12/18
to 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

unread,
Apr 12, 2018, 9:15:12 AM4/12/18
to grpc.io
Adding some more information.
The RPC is a BiDirectional streaming RPC

Carl Mastrangelo

unread,
Apr 12, 2018, 4:52:48 PM4/12/18
to 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

unread,
Apr 13, 2018, 12:18:22 AM4/13/18
to 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

unread,
Apr 18, 2018, 2:13:57 PM4/18/18
to 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.)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages