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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to