Is there a way to queue RPC call in gRPC

60 views
Skip to first unread message

deva...@gmail.com

unread,
Oct 29, 2018, 2:30:14 AM10/29/18
to grpc.io
Hi,

I want to limit number of threads in gRPC, I can limit it by setting maximum number of threads.
But if there are requests in process for defined number of threads, next RPC call immediately fails with RESOURCE_EXHAUSTED.

Is there a way that I can queue that request and it will execute once in process threads completes processing?



Carl Mastrangelo

unread,
Oct 29, 2018, 1:57:25 PM10/29/18
to grpc.io
What language are you using?

deva...@gmail.com

unread,
Oct 30, 2018, 4:30:32 AM10/30/18
to grpc.io
Am using C++

Vijay Pai

unread,
May 21, 2019, 11:34:55 AM5/21/19
to grpc.io
Hi there,

Sorry for the delayed response. The reason that we don't queue RPCs is documented at https://github.com/grpc/grpc/issues/8603 : this was an issue in Ruby before we allowed C++ thread pools to be limited, but all the same reasons described in the issue apply to C++ as well. Basically, queueing can lead to deadlock (and I gave an example in that issue) so better to fail with resource exhausted instead.

- Vijay
Reply all
Reply to author
Forward
0 new messages