microsoft / microsoft/vscode-remote-release
some http requests to remote are hanging when using remote container port forwarding
Open
@alexr00 is already working on this.
Since Apr 27, 2022.
bug
remote
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version: 1.66.2
- Local OS Version: debian 11.3
- Remote OS Version: debian 10.11 (node:16.14 image)
- Remote Extension/Connection Type: Docker
- Logs: -
Steps to Reproduce:
- run server in container(node:16.14 image).
// server.js
const { createWriteStream } = require("fs");
const http = require("http");
http.createServer((req, res) => {
req.pipe(createWriteStream("/dev/null")).on("finish", () => {
res.end();
});
}).listen(3000);
- set port forward local:3000 <-> remote:3000.
- run client in local with node v16.14.2.
// client.js
const http = require("http");
let count = 1;
for (let i = 0; i < 10; i++) {
const req = http.request(
"http://127.0.0.1:3000",
{ "method": "POST" },
(res) => {
res
.resume()
.on("end", () => {
console.log(`${count}: ${res.statusCode}`);
count += 1;
});
},
);
// from 64 * 1024 bytes, it began to exhibit freezing problem noticeably often.
// in some cases, you may have to increase the size.
req.write(new Uint8Array(64 * 1024));
req.end();
}
if directly request with container ip(like 172.17.0.x), it has no problem.
Does this issue occur when you try this locally?: No
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.