-
Notifications
You must be signed in to change notification settings - Fork 109
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
high-load http requests cause hanging tcp connection in close wait state #414
Comments
ntex tries to close connection gracefully, it takes some time. also if your app processing request and does not ready/write anything, socket could be kept open. is number of socket keep growing or is it steady? |
what runtime do you use? |
@fafhrd91, it is growing along with time |
I can see from the output, the Recv queue mostly have 1 byte left |
could you try ntex-tokio v0.5.1 |
OK I WILL do a cargo update. |
upgrade to 0.5.1 does not help much, also once it gets into high load, it seems can not recover and take any requests error return |
how many concurrent requests do you run? |
10K, with 20 workers on 10 core M2 machine |
are you sure that your handler completes request processing? ntex holds socket while handler is in process. you also beed to increase number of file descriptors on osx, it is not very high by default |
Hi,
I have http server running using ntex, and I can see high number of hanging tcp connection
there are hundreds of them..
Note that
<ip>
is from same ip that making the http requests, I just hide the actual ip with<ip>
.I wonder if there is issue in handling tcp connection close properly in ntex.
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
CLOSE-WAIT 1 0 172.31.0.9:26000
<ip>
:59050CLOSE-WAIT 1 0 172.31.0.9:26000
<ip>
:57932CLOSE-WAIT 1 0 172.31.0.9:26000
<ip>
:54710CLOSE-WAIT 1 0 172.31.0.9:26000
<ip>
:58766CLOSE-WAIT 966 0 172.31.0.9:26000
<ip>
:34230.....
The text was updated successfully, but these errors were encountered: