You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Yaacov Akiba Slama <ya...@slamail.org> on 2000/07/25 17:41:49 UTC

Memory leaks

Hello !

In our tests with Linux RedHat 6.2, JDK 1.2.2 from blackdown or 1.2 from 
Sun or 1.3 from IBM, Tomcat 3.1, a simple jsp which does a 
System.err.println() only, a multithreaded client (50 threads) which 
runs continuously, the memory used by the VM increases continuously and 
if the max heap size is set, we reach a OutOfMemory exception after a 
certsin amount of time.

I saw in this mailing list that Tomcat 3.1 seems to have memory leaks.
So my questions are :

1) Can you confirm that this continuous increase of memory use is due to 
Tomcat's memory leaks (and not to the configuration or any other parameter).

2) What is the memory behavior of Tomcat 3.2. Is it better.

Thanks a lot.


Re: Memory leaks

Posted by Costin Manolache <co...@eng.sun.com>.
Yaacov Akiba Slama wrote:

> Hello !
>
> In our tests with Linux RedHat 6.2, JDK 1.2.2 from blackdown or 1.2 from
> Sun or 1.3 from IBM, Tomcat 3.1, a simple jsp which does a
> System.err.println() only, a multithreaded client (50 threads) which
> runs continuously, the memory used by the VM increases continuously and
> if the max heap size is set, we reach a OutOfMemory exception after a
> certsin amount of time.
>
> I saw in this mailing list that Tomcat 3.1 seems to have memory leaks.
> So my questions are :
>
> 1) Can you confirm that this continuous increase of memory use is due to
> Tomcat's memory leaks (and not to the configuration or any other parameter).

No, it's not a memory leak.

Each JSP will create a new session - and if you make enough requests you'll run
out
of memory before the sessions will expire.

You need to disable session creation ( with a page directive - the default is
"use sessions")

> 2) What is the memory behavior of Tomcat 3.2. Is it better.

Same behavior, it's the spec that requires that.

In future we might start swaping session data on disk, etc - but I'm not sure
when it'll happen.

Costin