Skip to content

stats: keep the reply under the frame limit when thousands of connections are open #1165

Open

Description

@lydakis

Requested by George

Follow-up from Codex's review of #1149. stats now lists each open session in connections. A row is about 120 bytes, plus a label of up to 128 bytes. With roughly 5,000 to 8,000 open connections the whole stats reply passes the 1 MiB MAX_EVENT limit in src/output.rs, and Output::try_respond answers response_size_limit instead. Then none of the daemon's stats come back, not only the connection list.

Today's high end is 200 windows with a few connections each, plus agents' short-lived in-process sessions, so the list stays far below that (about 1,000 connections, about 200 KB). It matters only past that scale.

Options: page the list (after and limit, as processes does), or move it to its own op so the aggregate stats never depends on how many sessions are open.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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