Investigate client connection sockets in CLOSE_WAIT state
@thangngoc89 on Discord:
Even though there aren't any browser tabs opening, there are tons of close-wait in process list. Is this a bug ? Or is this an expected behavior of server applications?
These persisted for hours until @thangngoc89 killed the server.
Hi @aantron, we've encountered an issue that looks exactly like this. We're using Dream to implement a GraphQL API: in our case, the connections in CLOSE_WAIT are not coming from the browser but from the load balancer. The service runs smoothly for 36/48 hours, and then suddenly, 504 errors (read timeouts) start appearing on the load balancer side, as it obviously times out.
I won’t attach a screenshot of the CLOSE_WAIT connections since it's identical to @thangngoc89's, but I’m attaching the Grafana one instead: as you can see, at some point, something happens that triggers this situation.
Do you have any suggestions to help us with bug hunting?
