hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: Java can leak...
Date Fri, 30 May 2003 07:51:16 GMT

Let me elaborate. No doubt one can still do silly things in Java that may lead to severe memory
problems. However, the point I was trying to make is that Java applications do not 'leak'
memory in a way non-GC applications do. One can easily starve a java application of heap memory
if object allocation & de-allocation strategy is flawed. However, no java application
should ever consume memory above the limit specified with -Xmx option, unless there is a bug
in JVM. 

I guess you should try narrowing down the problem somewhat. At the moment all we can do is
to speculate. If you absolutely positive that the problem is somehow triggered by HttpClient,
please let us know some more details on your application's execution environment: OS version,
JVM version, application server or servlet engine used, and so on.


-----Original Message-----
From: Jan Gonsalves [mailto:JGonsalves@Xtensible.com]
Sent: Friday, May 30, 2003 00:09
To: Commons HttpClient Project
Subject: Java can leak...


I understand what you mean my mem alloc, but Java can leak, it's a 
proven fact.  Anytime ROOT has a reference to something it makes it 
unable to GC, however, if you loose your reference and ROOT still has 
it's, that's a memory leak.  ROOT will never GC that memory.  Ask 
youself this, if Memory leaks were impossible in JAVA, how can programs 
such as JProfiler or OptimizIt sell?


Oleg Kalnichevski wrote:

>HttpClient is a pure Java application and as such does not manage memory
>allocation directly. I suggest that you check if there are any known
>issues with the jvm you are using. Upgrading to HttpClient beta-1 would
>not hurt, anyways.
>On Thu, 2003-05-29 at 16:36, Jan Gonsalves wrote:
>>Does anyone know of any memory issues with opening a connection and 
>>continuely re-using it, only closing it when a socket timeout happens? 
>>I'm currently using ALPHA 3.  I have to "fake out a browser" and 
>>navigate through a website to extract information because they don't 
>>offer a straight DB connection.  I re-use this connection the whole 
>>time, never closing it, only recycling it, unless I get a socket 
>>timeout, ConnectionException, or HTTPRecoverableException.  Our 
>>Production server has 4GB of ram.  Last night we ran and the system went 
>>down to 4MB free, 4!  I'm just wondering if I'm leaking due to HTTP 
>>Client.  I've gone over my stuff and it looks relatively solid, I'm 
>>wondering now if I'm using HttpClient incorrectly.  Does Beta 1 help 
>>with any memory issues?
>>Jan Gonsalves
>>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message