You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Cole <co...@woodwinds.net> on 2007/03/24 20:48:03 UTC

Apache 2.2 mod_jk Tomcat 5.5 Keeps running

Hi

I have set up an Apache webserver to connect to a Tomcat server to process 
a page and everything works except the Tomcat starts to run at 100 percent
after processing the page. If I access the page directly thouugh the
Tomcat server(before trying with Apache/mod_jk) the page is fetched and
the tomcat goes back to a low amount of cpu activity. If I get additional
pages from the Tomcat via the Apache connection they work but at a slower
rate (I would guess because of the Tomcat is doing something else too).
The only way I can get the Tomcat back to normal operation is to stop the
server and restart it.  I would like to understand how to figure out what
keeps the Tomcat running

Thanks
Scott

I have a pc with the following software on it

Windows XP Service Pack 2
Apache 2.2.3(Win32)mod_jk/1.2.21
Apache Tomcat/5.5.23

my setup with mod_jk is as follows.


>From httpd.conf:

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
# log level can be debug, info, request, error, or emerg
JkLogLevel debug
JkMountFile conf/uriworkermap.properties


>From workers.properties:

# define the worker list
worker.list=tomcat1

# configure each worker
worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009


>From uriworkermap.properties

/Library/*=tomcat1
/Library=tomcat1
/servlets-examples/*=tomcat1
/servlets-examples=tomcat1



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


Re: Apache 2.2 mod_jk Tomcat 5.5 Keeps running

Posted by Scott Cole <co...@woodwinds.net>.
Well I had some success with this problem.  I was wondering why Tomcat would 
behave differently under a connection from the apache server
(localhost:8009) than 
a connection from a browser (localhost:8080).  After looking around I 
noticed
in server.xml there is a section called Connector for each port that is
served. 
I noticed the one for port 8080 had more things defined for it that the one
for 
port 8009.  So I added the maxHttpHeaderSize, maxThreads, minSpareThreads,
maxSpareThreads, acceptCount, connectionTimeout, disableUploadTimeout
parameters 
to the 8009 port and it seemed to work.  

Not sure why my application did not work with the default AJP connector
setup.  The 
only thing I could guess at was that I set an additional parameter for the
JVM when I started
tomcat (-Djdbc.drivers=com.mysql.jdbc.Driver)


<Connector
            port="8080"               
            maxHttpHeaderSize="8192"
            maxThreads="150" 
            minSpareThreads="25" 
            maxSpareThreads="75"
            enableLookups="false" 
            redirectPort="8443" 
            acceptCount="100"
            connectionTimeout="20000" 
            disableUploadTimeout="true" />

    <Connector 
             port="8009" 
             enableLookups="false" 
             redirectPort="8443" 
             protocol="AJP/1.3" />




Scott Cole wrote:
> 
> Hi
> 
> I have set up an Apache webserver to connect to a Tomcat server to process 
> a page and everything works except the Tomcat starts to run at 100 percent
> after processing the page. If I access the page directly thouugh the
> Tomcat server(before trying with Apache/mod_jk) the page is fetched and
> the tomcat goes back to a low amount of cpu activity. If I get additional
> pages from the Tomcat via the Apache connection they work but at a slower
> rate (I would guess because of the Tomcat is doing something else too).
> The only way I can get the Tomcat back to normal operation is to stop the
> server and restart it.  I would like to understand how to figure out what
> keeps the Tomcat running
> 
> Thanks
> Scott
> 
> I have a pc with the following software on it
> 
> Windows XP Service Pack 2
> Apache 2.2.3(Win32)mod_jk/1.2.21
> Apache Tomcat/5.5.23
> 
> my setup with mod_jk is as follows.
> 
> 
> From httpd.conf:
> 
> LoadModule jk_module modules/mod_jk.so
> JkWorkersFile conf/workers.properties
> JkLogFile logs/mod_jk.log
> # log level can be debug, info, request, error, or emerg
> JkLogLevel debug
> JkMountFile conf/uriworkermap.properties
> 
> 
> From workers.properties:
> 
> # define the worker list
> worker.list=tomcat1
> 
> # configure each worker
> worker.tomcat1.type=ajp13
> worker.tomcat1.host=localhost
> worker.tomcat1.port=8009
> 
> 
> From uriworkermap.properties
> 
> /Library/*=tomcat1
> /Library=tomcat1
> /servlets-examples/*=tomcat1
> /servlets-examples=tomcat1
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-2.2-mod_jk-Tomcat-5.5-Keeps-running-tf3459961.html#a9666845
Sent from the Tomcat - User mailing list archive at Nabble.com.


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