Skip to content

Stop can stall when two tabs exhaust HTTP/1.1 connections with SSE streams #1028

Description

@Floating-Y

Summary

With two tabs viewing an ongoing answer over HTTP/1.1, the Stop request can remain queued while the browser's connections are occupied by SSE streams.

Closing the other tab releases connections and allows Stop to complete. The same scenario works over HTTP/2 with both tabs open.

Steps to reproduce

  1. Access the application over HTTP/1.1.
  2. Open two tabs in the same browser profile and sign in with the same account.
  3. In tab A, ask or retry a question and keep the answer generating.
  4. In tab B, open the same conversation and confirm that it has reattached to the ongoing answer.
  5. Click Stop in tab B while keeping both tabs open.
  6. If Stop remains pending, close tab A.

Expected behavior

Stop reaches the server and stops the answer while both tabs remain open. The partial answer is saved once.

Observed behavior

  • Six active SSE responses were observed: each tab had an alerts stream, a knowledge-base events stream, and a chat stream.
  • After clicking Stop, its request had no response for more than three seconds.
  • Closing tab A allowed Stop to return 200 {"ok":true} within 46 ms in this run.
  • Tab B then displayed Stopped, and the partial answer was saved.
  • Through an HTTP/2 proxy, Stop completed with both tabs open.

The timing above is one measurement, not a fixed timeout.

Verification environment

  • Windows, Chromium 140.0.7339.16, headless, without custom connection-limit arguments.
  • Commit 44719a2 in Floating-Y/utopia, based on upstream 798fb24.
  • Real Rust server and PostgreSQL database.
  • A controlled local model endpoint kept generation active; the chat, reattachment, and Stop APIs were not mocked.

The notification subscriptions and Stop request logic are unchanged by that follow-up patch. This reproduction has not been rerun on an unmodified upstream checkout.

Likely cause

The two tabs occupy the browser's six HTTP/1.1 connections with long-lived streams, leaving no connection available for the separate Stop POST.

This matches the documented multi-tab SSE connection limit:
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events

Evidence

utopia-followups-http1-evidence-current.json

Activity

  1. WaylandYang commented on Oct 2, 2026

    @WaylandYang
    Contributor

    Thanks @Floating-Y for the careful report. I reproduced it on dev in a real browser over HTTP/1.1: two tabs on one generating answer hold six streams, and Stop gets no response.

    #1053 fixes it: a page now holds one notification stream instead of two (the base's stream carries the alert event), and a page hidden for 30 seconds gives that stream up and refreshes when shown again. With it, the same two-tab run returns 200 for Stop and both tabs show Stopped.

  2. WaylandYang commented on Oct 2, 2026

    @WaylandYang
    Contributor

    Fixed by #1053, merged into dev as 4f873e5.

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