You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Simon, Leonard" <le...@hsn.net> on 2012/07/05 19:05:18 UTC

Re: [EXTERNAL] Re: General Architecture Question for multiple websites on a single RedHat server

Chris,

I don't envision us using that but thanks anyway.
We are looking more at a vendor supported solution because of the many
things the system administration group supports and do not have the
expertise nor time for customized solutions.

But again thanks for offering.

We need to figure out what is causing Tomcat to use 100% of the CPU for
what we currently have in place. We were able to capture a thread dump at
the time of slowdown using a kill -3 but when the logs rotated we lost the
data. Will have to wait for the next slowdown.

On Wed, Jul 4, 2012 at 9:02 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Leonard,
>
> On 7/2/12 4:32 PM, Simon, Leonard wrote:
> > Our goals are as follows:
> >
> > The operating system will be RHEL 6.X.
> >
> > We want to run Apache and Tomcat on a single server running five
> > websites using different ports for each.
> >
> > Our goal is to manage each web server independently, i.e.,
> > separate shutdown and startup scripts and hopefully  different log
> > files for each web server.
> >
> > We noticed the bundled Apache/Tomcat with RedHat might only give us
> > a standard install. Is there a way to do an alternate path
> > install?
> >
> > Thanks and look forward to some ideas on how to accomplish this.
>
> I periodically threaten to post my multi-instance Apache Ant scripts
> to the list. I have recently split my build process into multiple
> build scripts including a build-tomcat.xml which will manage that kind
> of thing for you. It's still not a perfect separation, but it allows
> you to do things like define 'projectname.property=value' in
> ~/.ant.properties, set <project name="name"> in build.xml, then
> duplicate the whole thing over and over again.
>
> So, I have, for instance, "myproject1.tomcat-port" and
> "myproject1.tomcat-shutdown-port", etc. and then (near) duplicates for
> each project. Each developer on a shared dev server gets a batch of
> port numbers assigned for their own uses and then sets those up
> accordingly. Each webapp can also have a separate projectX.tomcat-home
> and projectX.java-home property, so that simply typing 'ant
> tomcat-start' in any project's directory will build an appropriate
> CATALINA_BASE (ports and all) for that webapp and then launch the
> webapp in that instance.
>
> All of this requires a fair amount of infrastructure to set up (build
> scripts, environment-specific server.xml, etc. files, etc.) but once
> it's done it makes your life sooooo much easier.
>
> I can share what I've got, but it will likely require you to heavily
> modify it to work in your environment since it's so deeply integrated
> into our complete build process.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk/055sACgkQ9CaO5/Lv0PCr/QCbBAC4LQmZxoMzdtarFxBXHbb8
> qjEAn3ldY08iFkVxlWrEkTLDgfxA7qql
> =ev/P
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: [EXTERNAL] Re: General Architecture Question for multiple websites on a single RedHat server

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Leonard,

On 7/5/12 1:05 PM, Simon, Leonard wrote:
> I don't envision us using that but thanks anyway. We are looking
> more at a vendor supported solution because of the many things the
> system administration group supports and do not have the expertise
> nor time for customized solutions.

So, you want a vendor-supported solution and you're asking a
volunteer-based community? I think you should be talking to RedHat.

Honestly, this kind of thing really needs to be heavily customized to
meet your needs. Just because my port-assignment conventions make
sense to me doesn't mean they will work for you.

For example, most of our webapps (which run in their own JVM/Tomcat
combinations) have a localhost-only HTTP connector which other webapps
can use as a loopback connection. That means that each webapp actually
requires *three* port numbers: one for AJP (for proxying from actual
clients), one for shutdown, and one for localhost-HTTP. (I suppose
technically, we could disable socket-based shutdown to free-up a port,
but the convenience of a clean shutdown is a nice thing to have).

If I were to submit my build scripts and get them included (even as an
unsupported contribution) in the distribution, they would need
tweaking to be useful to you, and then you have the same maintenance
issue that you would have with my (original) scripts: anytime an
update was released, you'd have to merge-in any changes. I suspect the
same will be true with any vendor-specific solution unless you pay
them directly to support something custom-built.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/22YUACgkQ9CaO5/Lv0PAVDACeIf1BbYgMFzsMoUJGEs7RWEgp
5ewAoL4Moo+LGkQlTlbs5J4SyndaJVp1
=nkWQ
-----END PGP SIGNATURE-----

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