cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: "address already in use" error

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 27 Jan 2012 10:57:18 -0800

On Fri, Jan 27, 2012 at 11:34:09AM +0000, curl_at_willcrook.airpost.net wrote:
> I'm having difficulties in using curl (windows) with several proxies
> simultaneously.
>
> I'm running 8 instances of curl with a unique proxy assigned to each,
> they all run very well until they start dropping off one by one with
> the error 'address already in use',
>
> The command line options (aside from the proxy) are: curl
> --connect-timeout 999 -v --retry 5, but from what I've read the error
> I'm experiencing will always halt Curl and it will never actually
> 'retry'.
>
> Curl is a great piece of software, but if anyone could help me with this
> niggle, then that'd be great!

How many transfers per minute does this setup perform? Since you're
using the command-line client, it wont be able to reuse the TCP
connection to the server so it will establish a new one each time. If
you're doing many such requests, you'll eventually put all the
ephemeral ports into a wait state and there won't be any left for new
connections until they timeout. You can try working around this with the
--local-port option, but better would be to re-architect the system to
reuse the proxy connection.

>>> Dan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-27