Too many Close_wait in jetty 9.0.3

2020-03-31 04:34发布

We have an application REST gateway deployed over jetty 9.0.3 server.For authentication and authorization of services deployed in jetty is taken care by apache commons-httpclient3.1. when there are huge number of concurrent threads hitting Rest gateway, lot of CLOSE_WAIT are piling up in REST gateway machine. Http connections which are opened for sending request to enabler(END POINT)are closed properly by calling releaseConnections method of apache commons. Please let me know how to handle these CLOSE_WAIT or any clues why connections are ending up in CLOSE_WAIT.

2条回答
欢心
2楼-- · 2020-03-31 05:10

CLOSE_WAIT means that TCP is waiting for the local application to close its end of the connection, which has already been closed by the peer.

Ergo you aren't closing them.

查看更多
男人必须洒脱
3楼-- · 2020-03-31 05:23

The close_wait connections vanished when closeIdleConnections(0) provided by Apache commons http Client 3.1. But now too many TIME_WAIT are getting established and back end i am getting errors like "Address already in use" :(

Finally CLOSE_WAIT connections were not seen after using closeIdleConnections(0). Hope this solution might help others :)

查看更多
登录 后发表回答