cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 10-at-a-time.c libcurl example - limitations?

From: Michael Wood <esiotrot_at_gmail.com>
Date: Thu, 1 Dec 2011 14:21:12 +0200

On 1 December 2011 13:02, Matthew Ford <ford_at_isoc.org> wrote:
> Hi,
>
> I'm trying to build on the 10-at-a-time.c example code (http://curl.haxx.se/libcurl/c/10-at-a-time.html) to write a small utility that reads in a bunch of hostnames from a file and tries to connect to them using the multi interface.
>
> I'm finding that this works fine up to a little over 1000 hostnames, and thereafter I get output, but there is no actual connection taking place behind the scenes.

Check your resource limits for the number of open file descriptors. e.g.:

$ ulimit -n
1024

> Is there an obvious reason for this limit either in the example code, or some aspect of the way libcurl is built?

I suspect this is your OS (resource limits) rather than libcurl or the
example code.

-- 
Michael Wood <esiotrot_at_gmail.com>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-01