Hello Everyone,
I'm using nginx to upload files, and after running it for a few days, I run the "netstat -antp" command to check the TCP connection, there are some "dead" tcp-ip connections that are never closed.
> netstat -antp
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 76681 0 xxx.xxx.xxx.xxx:443 xx.xx.xx.xx:50196 CLOSE_WAIT 1788/nginx: worker
tcp 151075 0 xxx.xxx.xxx.xxx:443 xx.xxx.xxx.xxx:37734 CLOSE_WAIT 1795/nginx: worker
tcp 366543 0 xxx.xxx.xxx.xxx:443 xxx.xxx.xxx.xxx:59342 CLOSE_WAIT 1796/nginx: worker
...
Until I stop nginx, these connections always show up and never close. If I stop nginx, the logs say:
2024/08/11 23:16:00 [alert] 1795#0: *1502970 open socket #25 left in connection 4
2024/08/11 23:16:00 [alert] 1795#0: aborting
2024/08/11 23:16:00 [alert] 1796#0: *2871753 open socket #14 left in connection 6
2024/08/11 23:16:00 [alert] 1796#0: aborting
2024/08/11 23:16:00 [alert] 1788#0: *843305 open socket #21 left in connection 6
2024/08/11 23:16:00 [alert] 1788#0: aborting
Please help me, how to force close these "dead" tcp-ip connections. Thank you so much.
NX1109