Re: RAM usage of Linux-based Tomcat server

2004-08-31 Thread Sagara Wijetunga

--- Jacob Kjome <[EMAIL PROTECTED]> wrote:

> At 10:57 PM 8/30/2004 -0700, you wrote:
> >I'm not worried about the transient memory used by
> the
> >Tomcat instance for it to serve servlets.
> >
> >But I'm worried about the memory permanently
> allocated
> >for a Tomcat instance. Eg. A servlet in a
> particular
> >Tomcat instance, may load the entire database into
> the
> >memory for efficiency reasons. Now this Tomcat
> >instance requires X amount of memory to keep the
> >database and all the stuff related to that Tomcat
> >instance (except transient memory) to keep them in
> >memory. And it requires additional variable amount
> of
> >transient memory to serve it, that depends on the
> >demand for that Tomcat instance.
> >
> >What I need to know is can I restrict the size of
> X?
> >
> >If the memory allocated permanently to a particular
> >Tomcat instance cannot be restricted, Can I
> restrict
> >the total memory allocation (ie. permanent +
> transient
> >memory) for that Tomcat instance?
> 
> The VM starts up with a default of 64 meg of RAM Max
> regardless of physical 
> memory.  You can increase this using -Xmx (with the
> Sun VM).  For 
> example...  java -Xmx 256m
> 
> Any out of memory errors you get are because the
> amount of memory needed by 
> the application exceeds the maximum memory barrier
> of the VM.  The only way 
> around this is to get rid of memory leaks and/or
> increase the maximum 
> memory for the VM.
> 
> look up -Xmx on Google for more info
> 
> Jake 
> 

Limiting memory for the JVM looks like solves my
issue. Can I run different JVM per Tomcat instance on
a single server?

Sagara



___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: RAM usage of Linux-based Tomcat server

2004-08-30 Thread Sagara Wijetunga
--- QM <[EMAIL PROTECTED]> wrote:

> On Mon, Aug 30, 2004 at 08:37:24PM -0700, Sagara
> Wijetunga wrote:
> : Since the servlet resides in the RAM once it is
> : loaded, the memory consumption and possible abuse
> is
> : my concern.
> 
> There's much more to memory in a Java webapp than
> just the servlets.
> Read on:
> 
> 
> : 1. Is it possible to run multiple Tomcat instances
> on
> : the same machine?
> 
> Yes.  Please refer to the Tomcat docs on how to do
> this.
> 
> 
> : 2. How much RAM (in roughly) is required for a
> single
> : or additional Tomcat instance without any servlet
> : loaded? Assume we use latest SUN Javasoft JVM and
> : latest Tomcat. 
> 
> Try not to think of individual servlets; think of
> the webapp as a whole.
> You must load-test and profile your app to see how
> much memory it will
> use in a peak situation because no two webapps are
> the same.  (i.e.
> there's no way someone who's never seen your app can
> give reliable
> numbers.  It's all up to you.)
> 
I'm not thinking at servlet level, not even at web-app
level. I'm thinking at Tomcat instance (Tomcat sever)
level. I understand each Tomcat instance can have
multiple web-apps and each web-app can have multiple
servlets? Am I wrong?

I'm not worried about the transient memory used by the
Tomcat instance for it to serve servlets.

But I'm worried about the memory permanently allocated
for a Tomcat instance. Eg. A servlet in a particular
Tomcat instance, may load the entire database into the
memory for efficiency reasons. Now this Tomcat
instance requires X amount of memory to keep the
database and all the stuff related to that Tomcat
instance (except transient memory) to keep them in
memory. And it requires additional variable amount of
transient memory to serve it, that depends on the
demand for that Tomcat instance.

What I need to know is can I restrict the size of X?

If the memory allocated permanently to a particular
Tomcat instance cannot be restricted, Can I restrict
the total memory allocation (ie. permanent + transient
memory) for that Tomcat instance?

> : 3. Once the RAM limit is specified to a particular
> : Tomcat instance, what happens if they exceed the
> : limit? Does it still continue to allocate RAM or
> does
> : it give a run-time error?
> 
> This has more to do with the JVM than with Tomcat. 
> (Tomcat runs within
> the JVM.)  You'd do well to read up on the
> specifics, but usually the
> JVM will throw an OutOfMemoryException, in which
> case it's up to you to
> repeat step 2 and profile/size.
> 

Does this OutOfMemoryException means it ran out of
physical memory or there are still lot more physical
memory available but the limit specified to the Tomcat
instance exceeded? 
 
Kind regards
Sagara




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: RAM usage of Linux-based Tomcat server

2004-08-30 Thread Sagara Wijetunga

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> >1. Is it possible to know how much RAM is used by
> >servlets by per domain basis?
> >
> >2. Is it possible to specify the maximum RAM could
> be
> >used by per domain basis?
> >
> >The domain is as example.com, my-domain.com, etc.
> 
> Pretty much no to both questions if you have them
> within the same Tomcat
> instances (e.g. two  elements), yes to both
> questions if you have
> separate Tomcat instances for your domains.  And
> it's not a Tomcat
> limitation or feature, it's a JVM memory tracking
> issue.
> 

Hi, Yoav, thanks for the reply.

I'm sorry I was not detailed enough.

I'm not using Tomcat yet, but thinking to use Tomcat
to offer Java/Servlets facility for couple of
different domains hosted on one Linux-based physical
server.

Since the servlet resides in the RAM once it is
loaded, the memory consumption and possible abuse is
my concern. Therefore, allocating RAM and limiting to
the allocated amount for different domain is what I'm
interested. Thereby, I can install sufficient physical
RAM in the server.

I'm interested to know more about the Tomcat instances
method you suggested. I have following queries
regarding it and could you help me to understand it
further?

1. Is it possible to run multiple Tomcat instances on
the same machine?

2. How much RAM (in roughly) is required for a single
or additional Tomcat instance without any servlet
loaded? Assume we use latest SUN Javasoft JVM and
latest Tomcat. 

3. Once the RAM limit is specified to a particular
Tomcat instance, what happens if they exceed the
limit? Does it still continue to allocate RAM or does
it give a run-time error?

4. Could you kindly explain (in very brief) where and
how do I specify the RAM limit?

5. What are the issues I should be aware of and keep
in mind when having multiple Tomcat instances on the
same server? 

Kind regards
Sagara








___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: sloppy English

2003-09-22 Thread Sagara Wijetunga
Making an attempt to write properly in whatever
language implies that you care and respect the
audience that you write.

Sagara

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can anyone running successfully tomcat and mod_jk on different machines with mod_jk for longtime

2002-12-24 Thread Sagara Wijetunga
I use jakarta-tomcat-4.1.12-LE-jdk14,
jakarta-tomcat-connectors-4.1.12-src,
Apache-2.0.39,2sdk1.4.1 on Red Hat Linux 8.0. No
problem.  

Pls refer for this for mod_jk configuration:
http://www.johnturner.com/howto/apache-tomcat-howto.html

Sagara


--- Venkat Reddy Valluri <[EMAIL PROTECTED]>
wrote:
> Hi,
> Can Any body be running tomcat 4.0.4(redaht 7.3,
> j2sdk1.4.1) and apache 2.0.40 on different machines
> with mod_jk successfully in production environment
> without giving problems(broken pipe etc... kernel
> out of memory error)
> 
> If anubody, could you please help in this regard
> Thks,
> --Venkat 
> 
> 
> 
> 

> ATTACHMENT part 2 application/ms-tnef
name=winmail.dat
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:



__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat + ssi for servlets

2002-12-23 Thread Sagara Wijetunga
Hello

>From where did u find  tag?...:) and how do u
know it works on Tomcat/SSI? 

Pls, read the
http://httpd.apache.org/docs/howto/ssi.html#basicssidirectives.

One way is:



Sagara

--- Jubair Hasan <[EMAIL PROTECTED]> wrote:
> Hello
> Im having trouble getting Tomcat to run servlets
> within .shtml files.
> I did as instucted below (shown on
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssi-howto.html)
> 
> Rename
> $CATALINA_BASE/server/lib/servlets-ssi.renametojar
> to $CATALINA_BASE/server/lib/servlets-ssi.jar.
> Remove the XML comments from around the SSI servlet
> and servlet-mapping configuration in
> $CATALINA_BASE/conf/web.xml.
> 
> This does not work.
> 
> in my shtml file I used 
> 
>  CODEBASE=http://localhost:8080/examples/servlet >
> 
> 
> I placed my serlvet class in the same directory as
> the servlet class used as examples by tomcat when
> you install it.
> I tried diffrent variations of the servlet tag. ie:
>  codebase=http://localhost:8080/examples/> 
> 
> can you help??
> 
> Regards and thank in advance
> 
> Jubair 
> 
> 
> 
>
-
> 
> You can find us at www.bacs.co.uk 
> 
>
*
> This communication is confidential and intended for 
> the exclusive use of the addressee only. You should 
> not disclose its contents to any other person.
> If you are not the intended recipient please notify 
> the sender named above immediately.
> 
> BACS Limited, registered in England, No 1023742, 
> 3 De Havilland Road, Edgware, Middlesex, HA8 5QA
>
*
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Need to include the output of a servlet running on one virtual host to the output of another servlet running on different virtual host?

2002-12-07 Thread Sagara Wijetunga
Need to include the output of a servlet running on one
virtual host to the output of another servlet running
on different virtual host?

I use Apache 2.0.39 to serve static html pages from a
Pentium III based PC server running Red Hat Linux 8.0.
I use Jakarta/Tomcat 4.1.12-LE-jdk14 to process
servlets on the same server and I use virtual hosting
also on the same server. I have further configured
Apache to process SSI for any html page whose
execution bit is set. All are (individually) working
fine.

I need to include some html code fragment generated by
the
http://BBB.sameDomain.com/mywebapp/servlet/myServlet
to the output of 
http://AAA.sameDomain.com/mywebapp2/servlet/myServlet2.


Could somebody please kindly explain to me how to do
this? And what other options available or any
workaround. 

Please note, my requirement is something similar to
the RequestDispatcher.include.

Here unfortunately, I cannot specify this servlet to
be taken from which server, i.e BBB.sameDomain.com. 

Many thanks in advance.

Regards
Sagara


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to include output of a servlet running on one virtual host to an SSI enabled html page on another virtual host?

2002-12-07 Thread Sagara Wijetunga
How to include output of a servlet running on one
virtual host to an SSI enabled html page on another
virtual host?

I use Apache 2.0.39 to serve static html pages from a
Pentium III based PC server running Red Hat Linux 8.0.
I use Jakarta/Tomcat 4.1.12-LE-jdk14 to process
servlets on the same server and I use virtual hosting
also on the same server. I have further configured
Apache to process SSI for any html page whose
execution bit is set. All are (individually) working
fine.

I need to include some html code fragment generated by
the
http://BBB.sameDomain.com/mywebapp/servlet/myServlet
to a SSI page served from
http://AAA.sameDomain.com/somepage.html. 

Could somebody please kindly explain to me how to do
this? And what other options available or any
workaround. 

Please note, I can include the output of the
http://BBB.sameDomain.com/mywebapp/servlet/myServlet
to a html page served from the same virtual host (i.e
BBB.sameDomain.com) by
 

Here unfortunately, I cannot specify this servlet to
be taken from which server, i.e BBB.sameDomain.com. 

Many thanks in advance.

Regards
Sagara


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: