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
maxDialConcurrency = 1000 #478
Comments
Are you sure you have more than 1000 connections trying to dial out at the same time? I'm guessing they are hanging trying to dial unavailable addresses? As a quick solution now you could try setting a lower dial timeout. The commit that added the |
@kirillDanshin any thoughts? |
The diaI timeout does not seem to cancel the dailing process.It just returns from the go-routine.However mayby I am wrong, maxDialConcurrency is not the problem. I tried to make maxDialConcurrency=1000000,but the problems is still there.And I add a log
I got some amazing prints...
I am in our production env,the network is quite good.ttl is very low. The dial timeout I set is 50ms.No matter what happens(host achievable,service down,etc),the tcpdialer shouldn't dial that long.Any ideas? |
Maybe you can try printing between these lines instead: Lines 186 to 187 in e5f51c1
And print addr as well to see which domain(s) is/are causing this.
|
I finally found the reason.I was testing network,So I used iptables to drop some packet,which surely made some host unachievable.And the net.ipv4.tcp_syn_retries is 6.That added up to nearly 2m7s. So when a host became unachievable, and the net.ipv4.tcp_syn_retries is very large.The 1000 limit runs out very quickly. |
I guess the question is now should fasthttp protect the user against this or should we remove it and just let the system run out of file descriptors or sockets to use. I'm in favor of the second, let the user configure things the way they like. @kirillDanshin what do you think? |
@kirillDanshin what do you think? If you don't care I'll change the code to remove this protection (yay less code) and let the OS handle it. |
@erikdubbelboer I think we should only add an option to disable this, but not removing this at all |
@kirillDanshin how do you see this option? It's currently implemented as a global option which makes it very hard to make this configurable. One way is to add a another version of all |
Hi, I use fasthttp to serve as a reverse-proxy.I occasionaly found there were many long durtions requests which shouldn't be so long.I read the fasthttp code and made some logs.Now I am sure that maxDialConcurrency (1000) is too small for me .
How does the 1000 come from ?Can I change it ?
The text was updated successfully, but these errors were encountered: