Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Help! Config of multiple hosts and JVM garbage.

Help! Config of multiple hosts and JVM garbage.

2004-02-10       - By Antonio Fiol Bonn�n

 Back
Reply:     1     2     3     4  

Hi Sergio,

1) public_html would be enough, AFAICT.

3) What I meant is: if you have 512Mb RAM, set your JAVA_OPTS=-Xmx256m
(as I understand that you may have half your RAM free when Tomcat is not
running). The idea about buying more RAM was a kind of a joke,
especially because I did not know how much RAM you had. 512Mb should be
enough in most cases, if you do not have memory leaks in your apps. If
you do, no amount of RAM will be enough.

Watch your "top" / "free" / whatever to see if you are eating up all RAM
and start swapping. If you do, and it is not a transient peak situation,
you are "eating too much", and should lower the -Xmx to some lower value.

If your apps need more memory, you will get OutOfMemoryError in your
catalina.out. In that case, raise your -Xmx.

And yes, you understood well, if you have to lower it, and also to raise
it, that means RAM is not enough ;-)

Yours,


Antonio Fiol

Sergio wrote:

>Hello, Antonio.
>1) You are absolutely right about mounting, but also I figure it out
>with jk2 connector (I find it in docs - it seems I was a little tired to find
it
>before:)). I've tryed to done it with mod_jk, but the problem was that
>I want to give access to their sites with FTP and limit this space up
>to "public_html" for each user and do not give them permissions to
>access to "webapps" for example.
>2) Thanks it helps!
>3) Yeap;) you right its "garbage collection". Thanks for suggestions.
>I have just 512 RAM (its HP ML330) - I know its not enough but we are
>poor people:)
>
>Thank you for help!!!
>
>
>AFB> Sergio wrote:
>
>  
>
>>>Hi All! Guys, I need help!
>>>My system is Windows 2003 Enterprise Server with Apache 2.0.48
>>>I need Windows for 3rd part application, but because I hate IIS so I am
>>>using Apache2(the best!!!).
>>>
>>>1)Does somebody can help me with configuration of Tomcat 5.0.18
>>>for multiple hosts? I need to deploy
>>>servlets separately for each user. Access will be configured in
>>>httpd.conf of Apache2.0.48 Some people uses multiples instances of Tomcat
for each user.
>>>Somebody uses one instance of Jboss with various deployed folders (its
actually my configuration
>>>now). But I need to do that trick with Tomcat. The biggest problem for
>>>me now - its to configure server.xml for two or more hosts. I cant
>>>find it in documentation. If you can help with with any tips and/or your
examples of
>>>httpd.conf, workers.prop..s etc. (all related parts of configuration
>>>of the servers) - please help.
>>>
>>>
>>>      
>>>
>
>AFB> I have never set up VirtualHosts in Tomcat. But if you do not need to
>AFB> have a "root" app, you do not need to (or at list I did not need to).
>AFB> Just "mount" the apps you need in the Apache VirtualHosts you need, and
>AFB> you are done.
>
>  
>
>>>2) How I can configure memory management for Tomcat (limits for memory using
for each
>>>process/application)? Is it possible somehow?
>>>
>>>
>>>      
>>>
>
>AFB> Not possible when using a single JVM.
>AFB> If you use multiple instances of Tomcat, you can set -Xmx256m (or
>AFB> whatever amount you need) in JAVA_OPTS environment variable. That will
>AFB> effectively limit the amount of memory used by your heap.
>
>  
>
>>>3) I have a problem with garbage of JVM caching. Any suggestions how I
>>>can organize "autocleaning"? How can I minimize the usage of the disk
>>>in this case?
>>>
>>>
>>>      
>>>
>AFB> What do you mean by disk usage? How is that related do "autocleaning",
>AFB> which I understand as "garbage collection"?
>
>AFB> Do you mean swapping? If so, ensure that your JVM is at most as big as
>AFB> your free _real_ memory. Otherwise, your OS qill start swapping unused
>AFB> bits. Then, the GC will reclaim them for collection. So, you are
>AFB> accessing the disk at least twice for something you could have avoided.
>AFB> (Side note: Get more RAM ;-)
>
>AFB> In any case, profiling your applications is a good way to go: you willl
>AFB> determine whether your app grows in memory usage with time, or if it
>AFB> remains constant. (Consider the former a bug.) If memory usage remains
>AFB> constant, you can stress your app, and determine how much memory it
>AFB> needs for "full load", and then you may allow it (JAVA_OPTS) no more
>AFB> than that, knowing it will work.
>
>
>AFB> Yours,
>
>
>AFB> Antonio Fiol
>
>
>
>
>  
>


©2008 junlu.com - Jax Systems, LLC, U.S.A.