flow icon indicating copy to clipboard operation
flow copied to clipboard

GRPC::ResourceExhausted: 8:Received message larger than max (4399180 vs. 4194304).

Open WIttyJudge opened this issue 3 years ago • 0 comments

Hi guys, I'm using your protobuf source files, but I have a problem with received message when I'm trying to get transaction result.

Steps to Reproduce

Backtrace of error.

Caused by:
GRPC::ResourceExhausted: 8:Received message larger than max (9259070 vs. 4194304). debug_error_string:{"created":"@1641864948.226107284","description":"Received message larger than max (9259070 vs. 4194304)","file":"src/core/ext/filters/message_size/message_size_filter.cc","file_line":205,"grpc_status":8}
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:29:in `check_status'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:180:in `attach_status_results_and_complete_call'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:376:in `request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:180:in `block in request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/interceptors.rb:170:in `intercept!'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:179:in `request_response'
/var/www/etl/shared/bundle/ruby/2.6.0/gems/grpc-1.42.0-x86_64-linux/src/ruby/lib/grpc/generic/service.rb:171:in `block (3 levels) in rpc_stub_class'
/var/www/etl/releases/20220109122655/lib/etl/flow_blockchain/flow_client/client.rb:68:in `get_transaction_result_by_id'

Code:

  class Client
    def initialize(node_address)
      @stub = Flow::Access::AccessAPI::Stub.new(node_address, :this_channel_is_insecure)
    end

    # Returns the execution result of a transaction.
    # @param [String] id
    # @return [FlowClient::TransactionResult] the transaction result
    def get_transaction_result_by_id(id)
      req = Flow::Access::GetTransactionRequest.new(id: to_bytes(id))

      begin
        res = @stub.get_transaction_result(req)
      rescue GRPC::BadStatus => e
        raise StandardError, e.details 
      else
        TransactionResult.parse_grpc(res)
      end
    end
end

How can I increase the maximum available received message length?

Thank you in advance!

WIttyJudge avatar Jan 11 '22 16:01 WIttyJudge