If this happens on the front end
this sounds like a misconfiguration

try setting min and max heap params for your JVM e.g.
-Xms256m -Xmx512m -XX:MaxPermSize=512m -XX:+PrintGCDetails XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled

On the back end
use stack variables as they fall out of scope they are freed
be careful on allocations for anything which uses Collector

finally if you dont need the memory (and you can spare 1-2 sec delay) dont be afraid to call Runtime.gc()
to recycle the discarded memory
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#gc()

Martin
----- Original Message ----- From: "Christian Andersson" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, July 31, 2008 8:02 AM
Subject: Re: is it possible more than 1 tomcat in single system?




Peter Crowther skrev:
From: Edi [mailto:[EMAIL PROTECTED]
consider, i had 4 java application running in one tomcat, if
one application
crashes, all the other 3 application gets crashes. right?


Correct.  But it's not always that simple :-).

It's your choice how you want to split up your applications between different containers (Tomcats in this case) to trade off memory use vs reliability. You might get a *less* reliable system by splitting up the applications into separate Tomcat instances, though. Each Tomcat runs in its own JVM, and each is allocated a maximum memory size. If you are not careful when tuning the system, you might find that one application in one Tomcat/JVM runs out of memory although there is plenty of spare memory in the system. If you put them all into one Tomcat/JVM, the applications all use the same (larger) memory pool.

And what happens if you get one "rough" application stealing all the memory? probably all your applications will stop functioning..

For me it is always better to have 1 application crash, then >1

it is also easier to see which application is the guilty one if only that application crashes..



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to