microsoft / microsoft/vscode-remote-release
Port forwarded from ASGI server in devcontainer hangs on connection
Open
Nobody has claimed this yet.
bug
containers
remote-explorer
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I am running the following set up:
- Running FastAPI server in a devcontainer via
uvicorn src.main:app --reload --host 0.0.0.0 --port 13337 - Forward the port using vscode's built-in port-forwarding feature, to localhost:13337
Observation:
curl http://127.0.0.1:13337within the devcontainer returns the correct responsecurl http://localhost:13337from my local machine (outside the devcontainer) hangs
What I've tried:
- Removing the
--reloadflag solves the issue. Similarly, setting--workers 1also solves the issue. And--workers nfor n > 1 results in the same issue - Same issue observed when running the FastAPI server with other ASGI web servers like hypercorn
Wanted to find out if this is a known issue and why this might be happening?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.