Closed
Description
We leak SSE connections to /api/v2/workspaceagents/{id}/watch-metadata
in at least the following scenarios, since v1.4.2.
- A workspace is restarted while the IDE plugin is tracking it
- You sign into a different Coder deployment with some workspaces running
I have a strong suspicion that #440 is involved, although possibly not the root cause.
Likely the cause of https://github.com/coder/customers/issues/741
How to reproduce
- Connect to a Coder server as a user running at least one workspace.
- Monitor the
coderd_api_concurrent_requests
gauge via the Prometheus endpoint on Coder server.
Either:
- Repeatedly stop and start the workspace
- Repeatedly sign into a different Coder deployment and then back into your test deployment
Then:
- Observer the concurrent requests guage climb with each cycle
- Exit VSCode, and see it drop.