Jean Remi, I am not sure how exactly I managed to be of help, but I am glad you have found a solution.
In general it is a good idea to reuse HttpClient instances along with the associated connection manager as much as possible. HttpClient is thread-safe when used with a thread-safe connection manager such as MultiThreadedHttpConnectionManager, so it is perfectly OK and even advisable to have just one HttpClient instance per application. This said we do have to admit that frequent allocation & deallocation of MultiThreadedHttpConnectionManager may result in excessive resource consumption (this problem appears to be platform/JRE dependent, though). HttpClient 2.0.1 & HttpClient 3.0 will provide methods to cleanly shutdown MultiThreadedHttpConnectionManager along with all pooled connections, thus eliminating potential resource problems Cheers, Oleg On Tue, 2004-07-13 at 14:04, JEAN REMI LECQ wrote: > I aim resolve my pb ! Thank a lot to Oleg Kalnichevski for his help. > > I just instanciate my MultiThreadedHttpConnectionManager in a static way... > The pb was that I could'nt properly release handle on it when my application > stop. So I never released all memory -> memory leak ! > > Thx > > > > -----Message d'origine----- > De : Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Envoy� : vendredi 9 juillet 2004 23:24 > � : Jakarta Commons Users List > Objet : Re: Using HttpClient , have memory leak -> I am not sure > processcorrectly released > > > On Thu, 2004-07-08 at 15:34, JEAN REMI LECQ wrote: > > Hi, > > > > I m using commons-httpclient-2.0-rc3. > > > > My application is used on the web and generate an interesting traffic. > > > > But the application generate some important memory leak on my web servers. > I > > am not sure that MultiThreadedHttpClient release correctly all HttpClient > ! > > In particular when HttpClient meets difficulties to make its socket > > connection (I have some Exception like thoses). > > > > I have read quickly the beta version about httpClient-3.0. It s seem taht > > the managment of the CONNECTIONTIMEOUT and SO_TIMEOUT have changed. But > > there are no info in the documentation. > > > > Jean Remi, > > HttpClient has not reached BETA yet. It's still in the ALPHA development > stage and we are not ready yet to freeze the API. > > Many things have been significantly improved in HttpClient 3.0. We are > currently working on the documentation for the next release (3.0 alpha2) > > As to your problem we need more specific details to be of any meaningful > help. > > * How exactly do you measure the memory consumption by the Java virtual > machine? > > * What's your platform? > > * What's your <strong>exact</strong> JRE/JDK version (including > revision)? > > * Exactly what kind of exceptions are you getting? > > Oleg > > > > > Maybe someone have already test the same pb... Have someone information on > > that ? > > > > Thx > > > > jr > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
