Skip to content

gRPC max receive message size exceeded when listing all leases #337

@raballew

Description

@raballew

Description

Running jmp get leases -a (include expired leases) fails with a RESOURCE_EXHAUSTED gRPC error when the response payload exceeds the default 4MB limit.

Error

Error: grpc error (Caused by: <AioRpcError of RPC that terminated with:
    status = StatusCode.RESOURCE_EXHAUSTED
    details = "CLIENT: Received message larger than max (4433153 vs. 4194304)"
>)

Root cause

The gRPC channel options in python/packages/jumpstarter/jumpstarter/common/grpc.py (_override_default_grpc_options) do not set grpc.max_receive_message_length, so it defaults to 4MB (4194304 bytes). When listing all leases including expired ones, the response can exceed this limit.

Possible solutions

  1. Increase client-side limit: Add grpc.max_receive_message_length to the default gRPC options (e.g., 16MB)
  2. Server-side pagination: LeaseList already has a next_page_token field -- implement pagination in list_leases to avoid large responses entirely

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions