Thiago 

MultiThreadedConnectionManager DOES maintain a pool of connections, which, I assume, 
is what you want.

Unlike MultiThreadedConnectionManager SimpleHttpConnectionManager maintains only a 
single connection at a time. Therefore, chances of getting a timeout on one connection 
_logically_ should be less compared to a pool of many connections. 

Besides, we need to differentiate timeouts that occur on kept-alive connections due to 
a period inactivity and those timeouts that occur due to a HTTP server failing to 
respond within given period of time. 

I am afraid we will not be able to help unless we have more detailed information on 
what is going on.
Can you provide us with the log? Here are the instructions on logging in HttpClient

http://jakarta.apache.org/commons/httpclient/logging.html

You may also want to have a look at this sample:

http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/MultiThreadedExample.java?rev=HEAD&content-type=text/vnd.viewcvs-markup

Cheers

Oleg


-----Original Message-----
From: Thiago [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 13:11
To: Kalnichevski, Oleg; [EMAIL PROTECTED]
Subject: RE: MultiThread


Hi Oleg,

First, thanks for your response. I´m actualy using with 
MultiThreadedConnectionManager, but when i change to MultiThreadedConnectionManager 
the connections timeout has decreased a lot. With MultiThreadedConnectionManager 
appears greater than SimpleHttpConnectionManager. It´s correct or i´m wrong?

I want to understand the MultiThreadedConnectionManager. Can 
MultiThreadedConnectionManager do what i want ? Can it manage a set of connections ? 
If yes, where can i find an example ?

Thanks very much. 

Waiting for response,

Thiago Costa



Citando "Kalnichevski, Oleg" <[EMAIL PROTECTED]>:

> Hi Thiago
> 
> I regret that your message has been ignored for so long.
> 
> 1. connection timeouts are perfectly legitimate from the HTTP spec standpoint. HTTP
> servers are not supposed to keep connection alive for too long. Probably HttpClient
> should be a bit smarter when encountering a stale connection. At the moment 
> HttpClient
> simply raises a HttpRecoverableException and let the caller deal with it
> 
> 2. Since you appear to be handling the multithread synchronization by yourself, 
> anyway,
> it may make sense to use SimpleHttpConnectionManager instead of
> MultiThreadedConnectionManager
> 
> Again, Mike Becke is the man to comment of connection pooling related stuff. I hope
> he'll correct me if I err on any of these accounts.
> 
> Apparently since the way MultiThreadedConnectionManager handles stale connections 
> seems
> to irritate quite a few folks out there, something needs to be done about it
> 
> Cheers
> 
> Oleg
> 
> -----Original Message-----
> From: Thiago Costa [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 00:03
> To: [EMAIL PROTECTED]
> Subject: MultiThread
> 
> 
> Dear Friends,
> 
> I'm using the HTTP Client in a pool of connection. I have created a
> class that manage a list of URL. For example: i have a list of 100 URLs
> of diferent hosts. I want to retrieve all this urls but i don't want
> to do this in a sequencial mode. I want to put  some connections in a
> paralel mode. Like for example... I want 10 connection in paralel...
> Then, when a connection finish an other starts. I want to use this in a
> meta engine to retrive documents in Web.
> 
> My problem is that httpclient is raising many exeptions of connection
> timeout. I'm running my application in  super fast internet provider
> and it's not normal these time outs.
> 
> Does the httpclient manage a pool of connection like that ?
> Does httpclient works well in a multithead mode ? How can i manage a
> list of url with a great performance ?
> 
> Can you help-me?
> 
> Thanks very much
> 
> Thiago Costa

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to