You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Charl Gerber <ch...@yahoo.com> on 2005/06/14 11:33:20 UTC

Tomcat memory question

My tomcat instance is now running 10 webapps and will
most likely get more, in the region of 15. My service
provider configures my server with 64MB heap space. 

Question is, what affects the memory usage? Purely the
number of hits (ie active sessions) or the number of
webapps as well? Should my server run ok with 64MB
heap memory for say 15 or maybe even 20 webapps?

The apps itself are rather small.

Thanks.

Charl

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


Problem with jakarta-connector

Posted by Jarkka Kivikanta <ja...@smallplanet.fi>.
Hi all,

I am having problems with the jakarta-connector version 1.2.13 and 
tomcat 5.5.9.
The apache version is Apache/2.0.46 (White Box).

I have the following configuration in httpd.conf:
<IfModule !mod_jk.c>
 LoadModule jk_module "/usr/lib/httpd/modules/mod_jk
.so"
</IfModule>

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile "logs/mod_jk.log"
JkLogLevel    trace
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat     "%w %V %T"

JkMount /jkmanager/* status
# Send JSPs  for context /examples to worker named worker1
JkMount  /examples/*.jsp worker1



The workers.-properties file looks like this:
ps=/

worker.list=jkstatus,worker1
workers.tomcat_home=/opt/tomcat/jakarta-tomcat-5.5.9
workers.java_home=/opt/jdk1.5.0_03

worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1

# Define a 'jkstatus' worker using status
worker.jkstatus.type=status

The problems is that in the mod_jk.log i will only get
... jk_handler::mod_jk.c (1715): Into handler jakarta-servlet
worker=worker1 r->proxyreq=0
... jk_handler::mod_jk.c (1883): Could not find a worker for worker 
name=worker1

It seems that the connector does not have the correct configuration?
The JkWorkersFile /etc/httpd/conf/workers.properties is pointing to
the correct configuration file but the connector is still unable to find 
the correct worker.

Does anyone have any suggestions?

Regards,
Jarkka Kivikanta

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


Re: Tomcat memory question

Posted by Charl Gerber <ch...@yahoo.com>.
Thanks. All things I will look into.

I have to use sessions, as users logon to the apps,
but it will probably help if I bring the session
timeout down to 5 or 10 minutes....



--- Tim Funk <fu...@joedog.org> wrote:

> 64MB is tight. But class definitions (IIRC) do not
> go onto the heap so you 
> could have a lot of classes without any worries.
> 
> But I recommend
> - Not using sessions (or severely limiting its use)
> - Tweak your server.xml to not have any of the
> examples, etc
> - Be very careful in creating large objects and
> holding on to references to them
> 
> -Tim
> 
> Charl Gerber wrote:
> > My tomcat instance is now running 10 webapps and
> will
> > most likely get more, in the region of 15. My
> service
> > provider configures my server with 64MB heap
> space. 
> > 
> > Question is, what affects the memory usage? Purely
> the
> > number of hits (ie active sessions) or the number
> of
> > webapps as well? Should my server run ok with 64MB
> > heap memory for say 15 or maybe even 20 webapps?
> > 
> > The apps itself are rather small.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: Tomcat memory question

Posted by Tim Funk <fu...@joedog.org>.
64MB is tight. But class definitions (IIRC) do not go onto the heap so you 
could have a lot of classes without any worries.

But I recommend
- Not using sessions (or severely limiting its use)
- Tweak your server.xml to not have any of the examples, etc
- Be very careful in creating large objects and holding on to references to them

-Tim

Charl Gerber wrote:
> My tomcat instance is now running 10 webapps and will
> most likely get more, in the region of 15. My service
> provider configures my server with 64MB heap space. 
> 
> Question is, what affects the memory usage? Purely the
> number of hits (ie active sessions) or the number of
> webapps as well? Should my server run ok with 64MB
> heap memory for say 15 or maybe even 20 webapps?
> 
> The apps itself are rather small.

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


RE: Tomcat memory question

Posted by Rob Dickey <ro...@jwisetech.com>.
Wow...where to begin...to answer in very general terms...

What affects memory usage?

The short answer is everything, and includes the two points you listed
below.

The long answer is it depends...how many concurrent sessions will each
webapp require...what size do you anticipate each session object to be (are
the webapps stuffing extra content into the session objects)...what
sub-services / resources are required for each webapp (jdbc, etc.), or are
these webapps just delivering simple html content...how is session
persistence configured...what is the session timeout value set to at the
container and/or for each web-app...if there is a HA requirement, then that
must be taking into account if clustering is being considered...and the list
goes on...

You really need to understand each of the webapps anticipated memory
footprint (in terms of concurrency, jdbc connectivity, etc.) to adequately
answer this question...better to take the time upfront rather than having a
client call up complaining about an http-500 (OOM) error...

The fact is that the garbage collection algorithms in recent JVM versions do
a good job of reclaiming memory, as long as your apps are well-behaved.

In summary, IMHO 64mb seems a bit low as a default...with the price of
memory I'd push everything up by a factor or two, especially if the server
(providing the tomcat service) sole purpose in life is running a single
instance of tomcat; of course, it would seem that you need to get agreement
from your service provider too :)

HTH

Rob

-----Original Message-----
From: Charl Gerber [mailto:charlgerber@yahoo.com] 
Sent: Tuesday, June 14, 2005 5:33 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat memory question

My tomcat instance is now running 10 webapps and will
most likely get more, in the region of 15. My service
provider configures my server with 64MB heap space. 

Question is, what affects the memory usage? Purely the
number of hits (ie active sessions) or the number of
webapps as well? Should my server run ok with 64MB
heap memory for say 15 or maybe even 20 webapps?

The apps itself are rather small.

Thanks.

Charl

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


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