nodejs/node

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

Open

#26,166 建立於 2019年2月17日

在 GitHub 查看
 (5 留言) (5 反應) (0 負責人)JavaScript (35,535 fork)batch import
help wantedhttpstale

倉庫指標

Star
 (117,218 star)
PR 合併指標
 (平均合併 18天 17小時) (30 天內合併 219 個 PR)

描述

  • Version: v10.15.1
  • Platform: Linux 0fe3a1d57e94 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 GNU/Linux
  • Subsystem: http,net

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.

貢獻者指南