I have a VM running CentOS 6. On this Linux box, I run 4 curl download concurrently.

In some case, one of the curl download hangs. ps shows that curl process is still there. And netstat shows the connection's RECV_Q is very long:

tcp   878104      0            ESTABLISHED 

The curl version 7.38.0.

Any idea? Why curl hangs? If increasing TCP buffer would help?

  • It seems you are not too "rapid" to get data from Recv_q. Could you please use the --trace option to see what it gets out? It seems your host is not able to get data from the socket. Curl parallel execution are for the same data or are they different calls ? – Echoes_86 Sep 19 '16 at 14:26
  • 1
    Could be any number of reasons, but my first guess would be PMTU fun caused by somebody blocking ICMPs between you and the server. – Satō Katsura Sep 19 '16 at 14:27
  • @SatoKatsura can you please give more details? How to resolve this issue? – TieDad Sep 20 '16 at 10:05
  • If you don't know what PMTU discovery is and what that has to do with ICMPs I'm afraid I don't have a quick solution for you. Sorry about that. – Satō Katsura Sep 20 '16 at 18:51

You could try running curl with strace and/or try with the latest version of curl (version 7.50.3).

  • Coz this is a production environment, I cannot run curl with strace. And since this issue is hard to reproduce, it's hard to debug with single test. – TieDad Sep 20 '16 at 10:07
  • You can statically compile strace and copy it over to the production environment, unless there are weird company policies in place. – Alexander Sep 20 '16 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.