Unable to open too many DevTools pages due to browser per-host connection limit being exhausted by SSE connections
- Dominant language
- Dart
- Stars
- 1.7k
- Forks
- 404
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 18
Description
Moving this from https://github.com/Dart-Code/Dart-Code/issues/5229.
If you run DevTools and open ~5 tabs for it, you'll find you can't open any more. This appears to be because the SSE connections are tying up the maximum number of connections Chrome allows to a single host.
From my testing of opening many https://echo.websocket.org/.ws pages, I _think_ WebSockets are not counted towards this limit, so the solution may be to migrate the SSE connections to WebSockets. However, I don't know if there may be internal issues with WebSockets that led to SSE being used initially (@kenzieschmoll do you know? there's currently a mix of WS + SSE, so I presume WS must work everywhere now?).
Another option may be to use HTTP2 (so requests can share connections), but it's not clear to me if Dart has a HTTP2 server (I found https://github.com/dart-lang/http2 but it doesn't look like a complete solution?).
Contributor guide
Research direction
Start by reproducing the issue with about five DevTools tabs and inspect how the existing SSE and WebSocket connections are established. Determine whether the connection approach can avoid Chrome's per-host limit; done means opening additional DevTools pages no longer fails because the host connection limit is exhausted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100