tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Wang <>
Subject RE: Multiple Tomcat-servers on a single machine
Date Thu, 21 Feb 2002 00:50:21 GMT
It may not be big on disk, but it is on memory usage!

One issue to be aware of: when you restart tomcat, but not the web server,
the persistent ajp13 connections that are initiated are not reset, and the
next N users (where N is the number of pre-setup connections, as per the
worker.NAME.cachesize= mod_jk property.  The number may be higher due to
system activity.) will get 500 errors.

A second issue is that even though you have virtual hosts, there is still
one central mod_jk properties file where you define the workers.  This
prevents easy automation of adding and deleting virtual servers via scripts,
compared to the old mod_jserv which allowed you to define everything inside
the virtual server.

But one apache server with multiple virtual servers connecting to multiple
tomcats is no problem, as long as you have enough memory.

   - Kevin

-----Original Message-----
From: Charles N. Harvey III [] 
Sent: Wednesday, February 20, 2002 9:30 AM
To: Tomcat Users List
Subject: RE: Multiple Tomcat-servers on a single machine

I have a question relating to this...

We run around 6 sites each of which has a www and a java directory. We will
be moving everything to tomcat very soon.  The web servers I will have
seperately from the tomcat servers with the ajp (mod_jk) connector
connecting the machines.

Apache has virtual hosts.  And within each virtual host I will have a
connection to the apropriate directory on the tomcat server where that
site's classes/applications are located.

What I want to be able to do though is restart one instance without dropping
the classloader of another.  Can I do that with one tomcat install and
simply having multiple connectors in the server.xml? Or do I have to install
tomcat multiple times?  It is not a big deal if I have to install many
times, it is not very large.

Thanks for the help.


> -----Original Message-----
> From: Ion Larranaga []
> Sent: Wednesday, February 20, 2002 12:24 PM
> To: Tomcat Users List
> Subject: RE: Multiple Tomcat-servers on a single machine
> I think that you have two possibilities to do what you want:
> - You could set up one instance of Tomcat with X different contexts,
>   so that each user has his own. Servlets from different users would
>   have different physical directories, so each user would have a different
>   working directory. This way, users would access their specific servlets
>   with URLs:
>         http://server/user1/servlet/yourServlet
>         http://server/user2/servlet/yourServlet
> 	  ...
> - But if you want the course to be more complete, including configuration
>   of Tomcat, of course you should set up different Tomcat instances for
>   one. These instances should listen on a different port, so they will 
> need
>   different configuration files (server.xml), updating the port each
>   HttpConnector listens to. This way, the URLs to access the servlets 
> would
> be:
>         http://server:8081/user1/servlet/yourServlet
>         http://server:8082/user2/servlet/yourServlet
> 	  ...
> Just as long as different instances do not try to listen to the same 
> port there should be no problem. If you will connect to Tomcat through 
> Apache, it is
> basically the same, but changing the port of ajp or warp connectors
> (depending on
> the Apache module you use)
> Hope it helps,
>    Ion
> -----Mensaje original-----
> De: Anders Gunnare []
> Enviado el: miercoles, 20 de febrero de 2002 17:49
> Para:
> Asunto: Multiple Tomcat-servers on a single machine
> Hello World,
> How shall I do if I would like to have multiple Tomcat-servers on a 
> single machine?
> I have tried to read the doc, but I can't understand how I practically 
> shall do the work... For example, 5 different UNIX-users shall have 5 
> different Tomcat-servers,
> one user=one Tomcat-server.
> The reasons is that I shall have a Servlet-course and I have one 
> UNIX-server where we shall do our work.
> Best regards
> Anders Gunnare
> Frontec
> Sweden
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message