mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
Merge pull request #2378 from vwoo/grpc_max_receive_message_length_ruby_doc
Show in gRPC Ruby doc how to avoid GRPC::ResourceExhausted exceptions
This commit is contained in:
commit
089d461552
@ -171,3 +171,15 @@ stub = Lnrpc::Lightning::Stub.new(
|
||||
# Now we don't need to pass the metadata on a request level
|
||||
p stub.get_info(Lnrpc::GetInfoRequest.new)
|
||||
```
|
||||
|
||||
#### Receive Large Responses
|
||||
|
||||
A GRPC::ResourceExhausted exception is raised when a server response is too large. In particular, this will happen with mainnet DescribeGraph calls. The solution is to raise the default limits by including a channel_args hash when creating our stub.
|
||||
|
||||
```ruby
|
||||
stub = Lnrpc::Lightning::Stub.new(
|
||||
'localhost:10009',
|
||||
credentials,
|
||||
channel_args: {"grpc.max_receive_message_length" => 1024 * 1024 * 50}
|
||||
)
|
||||
```
|
Loading…
Reference in New Issue
Block a user