On Thu, Jan 30, 2003 at 04:28:38PM -0500, Turner, John wrote:
> 
> Are you sure?

Well, I was pretty sure...  if the server is idle and I
request a single jsp suddenly a half-dozen (more or less,
depending on the complexity of the page) tomcat threads are
active for no discernable reason.  I used to have log
entries that I think also supported my interpretation, but
I'm not finding them now.

So I added a valve to one of the <Host>s:

    <Valve className="org.apache.catalina.valves.AccessLogValve"
             directory="logs"  prefix="com_example_access_log." suffix=".txt"
             pattern="common" />

and after that I didn't see the multiple tomcat4:javas
running on each access to jsps on that host, although I
still did on the other hosts.  So I added AccessLogValves to
the other <Host>s and now I don't see the behavior.

> Your config looks good, and Tomcat doesn't talk to the
> browsers directly...it communicates with Apache via the Connector.

I still think it's weird, though.

(BTW:  I upgraded to libapache-mod-jk to 3.3a-4woody1, and
this is Linux kernel version 2.4.20.)



> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 30, 2003 3:50 PM
> > To: [EMAIL PROTECTED]
> > Subject: tomcat (4.0) serves requests apache (1.3) should handle
> > 
> > 
> > 
> > I'm using Apache/Tomcat/mod_jk from Debian 3.0 (woody) to
> > serve multiple virtual hosts.
> > 
> > tomcat4        4.0.3-3woody2  Java Servlet 2.3 engine with 
> > JSP 1.2 support
> > j2re1.3        1.3.1.02b-2    Blackdown Java(TM) 2 Runtime 
> > Environment, St
> > j2sdk1.3       1.3.1.02b-2    Blackdown Java(TM) 2 SDK, 
> > Standard Edition
> > libapache-mod-jk 3.3a-4       Apache connector for Tomcat 
> > servlet engine
> > apache         1.3.26-0woody3 Versatile, high-performance HTTP server
> > 
> > I upgraded from tomcat 3.2 some months ago.  Since then I've
> > noticed (using top) that tomcat appears to be serving
> > graphics in addition to the JSP pages they appear on.  This
> > causes unnecessary load on the server.
> > 
> > My httpd.conf contains entries like this:
> > 
> >     <VirtualHost 172.16.0.127>
> >     DocumentRoot /home/user/example.com
> >     ServerName www.example.com
> >     RewriteEngine on
> >     RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
> >     RewriteCond %{HTTP_HOST} !^$
> >     RewriteRule ^(/.*)      http://www.example.com$1 [L,R=permanent]
> >     ErrorDocument 404 http://www.example.com/index.jsp
> >     JkMount /*.jsp ajp13
> >     <Location "/WEB-INF/">
> >         AllowOverride None
> >         deny from all
> >     </Location>
> >     <Location "/META-INF/">
> >         AllowOverride None
> >         deny from all
> >     </Location>
> >     </VirtualHost>
> > 
> > workers.properties has:
> > 
> >     workers.tomcat_home=/usr/share/tomcat4
> >     ps=/
> >     worker.list=ajp13
> >     worker.ajp13.port=8009
> >     worker.ajp13.host=localhost
> >     worker.ajp13.type=ajp13
> >     worker.ajp13.lbfactor=1
> >     worker.loadbalancer.type=lb
> >     worker.loadbalancer.balanced_workers= ajp13
> >     
> > worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps
> > )tomcat.jar
> >     worker.inprocess.cmd_line=start
> >     
> > worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$
> > (ps)i386$(ps)classic$(ps)libjvm.so
> >     
> > worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)in
> > process.stdout
> >     
> > worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)in
> > process.stderr
> > 
> > server.xml looks like this:
> > 
> >     <Server port="8005" shutdown="SHUTDOWN" debug="0">
> >       <Service name="Tomcat-Standalone">
> >         <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
> >                    port="8009" minProcessors="5" maxProcessors="75"
> >                    acceptCount="10" debug="0" address="127.0.0.1"/>
> >         <Engine name="Standalone" defaultHost="localhost" debug="0">
> >           <Logger className="org.apache.catalina.logger.FileLogger"
> >                   prefix="catalina_log." suffix=".txt"
> >                   timestamp="true"/>
> >           <Realm 
> > className="org.apache.catalina.realm.MemoryRealm" />
> > 
> >             <Host name="www.example.com" debug="0"
> >                     appBase="/home/user" unpackWARs="false">
> >                 <Context path=""
> >                     docBase="example.com"
> >                     debug="0"
> >                     privileged="false" >
> >                 </Context>
> >             </Host>
> >         </Engine>
> >       </Service>
> >     </Server>
> > 
> > 
> > Is there something I have to set to tell Tomcat to close the
> > connection to the browser after serving the jsp page?

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

Reply via email to