cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Many CLOSE_WAIT when handling lots of URLs

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Feb 2014 23:24:00 +0100 (CET)

On Tue, 11 Feb 2014, Shao, Shuchao wrote:

> 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.

That's plain incorrect. Read the code again.

> I also check the code before the commit d021f2e8a00

There's really no point in that. Work with what we have now instead.

> Seems there is no opportunity to close the connection in the cache until
> call the cleanup function?

ConnectionDone() ?

> May be this is the cause of the many CLOSE_WAIT issue?

I can't rule out that there's a bug somewhere but it isn't as simple as you
claim here.

I believe your primary problem is due to you not using libcurl properly.

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