-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy closing connection before sending all the data #406
Comments
I'm having the same issue. I investigated further and found that any content over 10901 bytes in length has it's connection closed. Any ideas? Node 10.6 |
Ok so I figured out a solution to my problem. I was using a HTTPS to HTTPS proxy with an Apache server. The Apache server had Keep Alive turned off. Turning it on seems to have solved the issue. |
I have the same issue. I have a backend Apache server (http) and a frontend https node-http-proxy. The problem happens on about 20 % of the requests. I'm trying to fetch a document of 243543 bytes, but sometimes the (frontend) connection is closed when 14431 bytes are remaining. This doesn't happen if I change the frontend to http. Turning on keep-alive in the backend seems to fix it, but only for certain clients. If you run curl in HTTP 1.0 mode ( Maybe there's a timing problem somewhere in the http-proxy code, a one that' sonly triggered in a certain keepalive config, and for some reason only when serving https. How to fix? Any workarounds? |
I tried to write a test case on this. It was difficult, since the problem seems to only appear when there's some latency between the client and the proxy server. I didn't have time to find a tool to simulate the latency, so the test doesn't show the problem when executed on one machine. However, the problem should appear when How to test:
UPDATE: I first thought that the problem only appeared with some specific keepalive settings. Now I'm able to reproduce it without curl's UPDATE 2: It seems that the bug only happens on specific versions of eg. But there seems to be more to it. I created a simple HTTPS server that only sends data (see https://gist.github.com/tuomassalo/6296041), and most versions of
My I'm quite confused about this whole thing. Is there a node.js problem? A Oh, btw, I'm running node v0.10.15 on all servers. |
@NachoSoto this bug is probably fixed in v0.11.x. See nodejs/node-v0.x-archive#6107. Can you test by running http-proxy on v0.11.x? |
This turned out to be a node.js problem, and will be fixed in node.js v0.10.21. See nodejs/node-v0.x-archive#6107. |
…blem." This reverts commit a7518b7. It seems the problem is related to the proxy I'm using to serve the directory from over a custom HTTPS domain: http-party/node-http-proxy#406
I recently upgraded my backend to node 0.10.4 and node-http-proxy 0.10.1 and some of my services stopped serving static files correctly. After a while poking around, I
curl
ed the file locally using http and it was serving it correctly, but then I noticed this whencurl
ing behind the proxy:This is how I'm using http-proxy:
Any ideas why this stopped working all of a sudden? Let me know if you need any more details.
Thanks in advance.
The text was updated successfully, but these errors were encountered: