-----Original Message----- From: curl-library [mailto:curl-library-boun...@cool.haxx.se] On Behalf Of Daniel Stenberg Sent: Tuesday, January 07, 2014 06:46 To: libcurl development Subject: Re: Many CLOSE_WAIT when handling lots of URLs
> Because if you do, the diff between your version and the original version > certainly should have some useful clues, right? The option CURLMOPT_MAXCONNECTS is not used at all in libcurl. It just parse the value to multi->maxconnects, but no function use this value to limit the connection numbers. I check the functions ConnectionStore(), Curl_conncache_add_conn() and curl_multi_add_handle(), these is no restriction on the number of connections to store in cache! I also check the code before the commit d021f2e8a00, it use this value to limit the connection number in function curl_multi_add_handle(). Seems there is no opportunity to close the connection in the cache until call the cleanup function? May be this is the cause of the many CLOSE_WAIT issue? ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html