cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem with CURLE_COULDNT_CONNECT on FTP

From: Gokhan Sengun <gokhansengun_at_gmail.com>
Date: Fri, 4 Nov 2011 10:47:44 +0200

> Could it also be that there are unclosed FILE * handles?
> I assume that libcurl is not leaking sockets.
>

It could be anything Linux considers as a file handle (FILE, pipe, socket,
etc). libcurl is probably innocent :)

> I do a propper curl_global_cleanup after i'm finish with "ALL" transfers.
>
> But maybe the problem is "ALL".
> Because i like to avoid multiple reconnects i keep the "curl_easy session"
> open by just calling curl_easy_reset before every file transfer.
> I only cleanup after the connection is no longer needen.
> But this should not affect the amount of open sockets?
>

It depends on the number of "ALL", if it is greater than total allowed soft
limit of FDs, then it is a trouble.

I have not used it for years but utilized once, maybe you can use it to
further debug. "valgrind" could be of help here. It will tell you the
openers of the file descriptors. The option is "--track-fds=<yes|no>".

http://valgrind.org/docs/manual/manual-core.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-04