Skip to content

[BUG]: a slow SSE client can balloon server memory #231

Description

@gjanco

The outgoing SSE channel is bounded by item count, not bytes: mpsc::channel::<Result<Bytes, String>>(streaming_buffer_size), default 400 (handlers.rs:742, main.rs:65). There is no per-item size cap, and several event fields are unbounded (#232), so one slow client can hold up to 400 arbitrarily large chunks in memory while every producer upstream blocks on send().

Verified against main 2026-07-17. Severity scales directly with #232: once event fields are bounded this becomes a modest fixed buffer, but while they are unbounded the worst case is buffer_size times largest_event.

Activity

  1. Shearerbeard commented on Jul 17, 2026

    @Shearerbeard
    Collaborator

    Vetted 2026-07-17. Still count-based on main: mpsc::channel(streaming_buffer_size), default 400, with no per-item byte cap (handlers.rs:742). The memory arithmetic in this ticket holds. How hard it bites depends on the unbounded event fields tracked in #232. Description updated.

  2. changed the title [-]Slow client backpressure cascade[/-] [+][BUG]: a slow SSE client can balloon server memory[/+] on Jul 17, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions