tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat 4.1 Out of memory exception
Date Thu, 01 May 2003 12:52:50 GMT

Howdy,

>Can't help you too much with Linux.  BTW, why do you set -Xmx in the
>JAVA_OPTS.  CATALINA_OPTS is what the tomcat startup scripts read.
Maybe
>they read JAVA_OPTS as well, but I haven't checked to verify this.

They read both CATALINA_OPTS and JAVA_OPTS.  I actually recommend using
JAVA_OPTS for Java VM options as it's clearer.  CATALINA_OPTS may be
reserved in the future to allow Catalina-specific, non-JVM options.

>>When i restart the tomcat the java threads are still occupying the
memory
>so
>>i added this when i restart tomcat.
>>
>>kill -9 `ps -ef | grep "jdk1.3.1" | tr -s " " | cut -d' ' -f2`
>/dev/null
>>2> /dev/null

You shouldn't be killing threads like that.  Shutdown tomcat properly,
and the threads will go away.

> Am I doing something wrong?

Yes: you don't know your app's memory requirements.  It could be that
your app needs more than 256M.  Or it could be that you're hanging on to
references to objects you no longer need, thereby preventing the garbage
collector from doing its job.  The solution is to review your code, use
a profiler to see where memory is allocated, and tune JVM options
accordingly.

These types of issues have been covered on this list many times in the
past: you may find more valuable information in the archives.

Yoav Shapira
Millennium ChemInformatics



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message