cURL / Mailing Lists / curl-library / Single Mail

curl-library

Running out of sockets

From: Rob Booth <rbooth_at_indyme.com>
Date: Wed, 1 Dec 2004 12:47:20 -0800

My application needs to send data (via FTP) to multiple machines (500+).
Once we got to the 500+ mark we started getting an "Failed to upload file
'x' couldn't create socket" error. Looking into my application I found that
using libCURL to make this FTP transaction results in 4 sockets. Other
actions being taken by my application take this socket count up to 13 per
machine being transferred to, not counting other overhead sockets that are
used for database and http connections. Now each transfer takes less than 1
second and I'm setup to distribute to 8 machines at a time (forked
processes).

Looking at my network statistics I see my sockets end up hanging around for
approximately 1 minute from the time of release. What I want to know is, is
there a way to force my operating system (Linux - Red Hat) to release those
connections as soon as I'm done with them? I'm sure this isn't really a
libCURL issue, but I thought this would be the best place to get an answer.

Thanks,
Rob
Received on 2004-12-01