Skip to content
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

http socket might get reset instead of normal close while handling timeout #26166

Open
mariusgrigaitis opened this issue Feb 17, 2019 · 4 comments
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed. http Issues or PRs related to the http subsystem.

Comments

@mariusgrigaitis
Copy link

We were experiencing unexpected dropped connections between AWS ALB and nodejs application resulting in 502 errors from load balancer.

Managed to replicate a condition when nodejs abnormally closes socket with RST packet instead of normal FIN packets.

Here's exact conditions:

server.timeout = 10 * 1000;
server.keepAliveTimeout = 0;

image

We kept doing requests to the same connection every 10 seconds to trigger the condition.

Note that data was received and acknowledged, but instead of handling data or closing socket in a normal way nodejs reset the tcp connection.

@lpinca lpinca added the http Issues or PRs related to the http subsystem. label Feb 18, 2019
@thomasjungblut
Copy link

I'm currently debugging a similar issue with carbon and AWS classic ELB.
We do set the IDLE timeout on it to 60s and our keepAliveTimeout to 65s.

@thomasjungblut
Copy link

any idea? I realize that node.js uses libuv underneath, maybe it would be useful to involve them as well?

@mariusgrigaitis
Copy link
Author

@thomasjungblut you might also want to check #26165

Our solution was to set the headersTimeout 0

@thomasjungblut
Copy link

@mariusgrigaitis so we tried that out on top of node:dubnium-jessie-slim (currently at v10.15.3)
furthermore we have a similar issue using ALBs and websockets which give us 502s in that scenario.

@jasnell jasnell added the help wanted Issues that need assistance from volunteers or PRs that need help to proceed. label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need assistance from volunteers or PRs that need help to proceed. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants