Ari Halberstadt wrote:

> [EMAIL PROTECTED] (Jon Spelbring) wrote:
> >...
> >I've also gotten a couple java.lang.OutOfMemoryError: null errors too.
> >...
>
> Look for memory leaks in your servlet.
>

The problem is exactly as reported "out of memory".  The reason goes into
how your Java VM access system memory and how much it is allowed to grab
from system memory store.  I have encountered the same problem ealier, and
what I did was to specify the initial and maximum memory for the java VM.
for Java 2 VM, it goes as:

java -Xms60 -Xmx120m (the rest could be classpath, and class name,etc.)

for JDK1.1.x based VM, the syntax is a little bit different, but the same
idea there.

what it says is that java VM starts by grabbing 60MB from system, and it
could use up to a maximum of 120MB.  Note that, with this setup, you VM
will always occupy at least 60MB of memory, regardless of where it actually
use it or not.  To check how much your servlet will need at its peek time,
use Runtime class methods to check the VM memory usage.

Just a kind remark, there is no such thing called memory leak in Java.
Memory used by java is automatically managed by VM, mostly out of the
control and will of the programmers.

>
> >Has anyone else seen this behaviour?  I'd like to use the Apache/JServ
> >solution in some projects I'm working on, but this is seeming less and
> >less stable to me.
>
> It's stable enough. Just keep plugging at it.
>
> -- Ari Halberstadt mailto:[EMAIL PROTECTED] <http://www.magiccookie.com/>
> PGP public key available at <http://www.magiccookie.com/pgpkey.txt>
>
> ----------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://www.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]

--
Metaphase Technology Group | voice: (651) 482-2966
4201 Lexington Ave N, Arden Hills, MN 55126




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to