commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: HttpClient: can it cause "too many open files" ?
Date Wed, 02 Nov 2005 23:53:17 GMT
On Wed, 2005-11-02 at 18:03 -0500, Zhaohua Meng wrote:
> HttpClient gugus,
> I have a HttpClientEngine (see code listing at the bottom ) which wraps 
> commons HttpClient. It is used as following in my code deployed on SuSe 
> Linux.
> for (int i=0; i<requests.length; i++)  }
>         HttpClientEngine engine = new HttpClientEngine ();
>         response = engine.doPost(requests[i]);
>         //code to process response
> }
> In real situation t he request loop can be as big as 500+. After the code 
> running for a while I got "too many open files" exception. I know in Linux 
> a stream is considered a file. 

have you checked the number of file descriptors available?

(i'll not bore the list with the details: how to do this is easily found
on google)

many linux distributions now ship with default allocations which are far
too low for any serious server usage. so, this is usually my first port
of call when this issue crops up.

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message