Hello Tomcat Users,

I have seen some people complaining of CPU usage rising to 100%, and I found
the following in the readme:
----
6.11 Misconfiguration Can Cause CPU-Bound Loop

If you misconfigure Tomcat 3.2 in a way that there is no valid context to
handle a request (such as removing the root context and then attempting a
request that should be handled by that context), Tomcat will enter a
CPU-bound
loop instead of responding with a 404 error.

Workaround:  kill the offending Tomcat process and correct your server.xml
file such that there is a properly configured root context.
----
I think this may be my problem. I am running a Tomcat 3.2.1 in Apache 1.3.14
on Red Hat 6.2. I have a domain www.zzz.net, and I want it to be accessible
from http://zzz.net as well. For Apache this is easy. I am using
VirtualHosts so I have the following in my httpd.conf:

<VirtualHost 1.2.3.4>
ServerName www.zzz.net
ServerAlias zzz.net
DocumentRoot /home/httpd/html
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
...
</VirtualHost>

For Tomcat in server.xml I have:

<Host name="www.zzz.net" >
  <Context path="" docBase="/home/httpd/html"
   crossContext="true" debug="0" reloadable="true" trusted="false" />
</Host>

The question is do I have to have a different context for every ServerAlias?
This is inefficient since the servlets and JSPs are the same, but a
different servlet context would create yet another directory is
/usr/local/tomcat/work and the same servlets would have to be recompiled
depending on which URL you used. So that I would have:
        /usr/local/tomcat/work/www.zzz.net_8080/    and
        /usr/local/tomcat/work/zzz.net_8080/
I tried doing a symbolic link, but it didn't work properly.
(Why the 8080 suffix? I don't even have Tomcat listening on 8080 anymore?)

I think this may be why my CPU utilization occasionally goes to 100%,
because I don't have a context for every alias. I am not positive.

Can anybody recommend a solution to this? I hope this information helps some
others who have been complaining of 100% CPU utilization.

I am not currently subscribed to the list, so please Reply To All if you
have a solution.

Thank you,
Daniel Zen
Zen Digital - http://www.zendigital.com
Bridging Media & Technology with Spirit
151 East 3rd St Suite 5A
New York, NY 10009
212 674.5004 fax 425 984.0771

Reply via email to