First time posting on the tomcat list so bear with me if this doesn't make any sense :)

I am currently in development of an app which we are testing through tomcat6 (websphere specifically). Now that we are moving to production we wanted to use apache (Apache 2.2.8) to serve up static content instead of running everything through tomcat. I am running into a small performance issue, which seems to be eluding me. I have a good amount of experience with apache but very little tomcat experience so tell me if this looks off. First of all, the issue...

Basically it seems like I can't get concurrent requests to apache once an AJP connector request fires off to tomcat. It seems like the struts action I call blocks other requests to the apache process till it returns with a response. This is not the case when I am connecting directly to tomcat. Below are two images of firebug http monitors that should highlight what I am describing...

Tomcat Direct - http://207.7.102.90/~thecorp/tomcat.jpg
Apache AJP - http://207.7.102.90/~thecorp/apache-ajp.jpg

As you can see, the static files like css/js/imges start loading concurrently with the struts action on the Tomcat Direct method but not with AJP which seems to wait till the action returns before loading other files. Here are the relevant config options I have set for the server.

Apache2.conf (I am using prefork)*
*<IfModule mpm_prefork_module>
   StartServers         10
MinSpareServers 10 MaxSpareServers 20
   MaxClients          256
   MaxRequestsPerChild   0
</IfModule>*

*JkSetup*
*JkWorkersFile /etc/local/WebSphere/var/config/workers.properties JkLogFile /etc/local/WebSphere/var/log/apache_mod_jk.log JkLogLevel error JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkShmFile /etc/local/WebSphere/var/log/mod_jk.shm

Tomcat Config.xml
<attribute name="minSpareThreads">25</attribute>
<attribute name="maxSpareThreads">75</attribute> <attribute name="enableLookups">false</attribute>

Worker Config
worker.list=geronimo_ajp13
worker.geronimo_ajp13.port=8009
worker.geronimo_ajp13.host=localhost
worker.geronimo_ajp13.type=ajp13

Virtual Host
JkMount /*.pages geronimo_ajp13
JkMount /*.jsp geronimo_ajp13
JkMount /*.action geronimo_ajp13
JkMount /*j_security_check geronimo_ajp13

I assume its something wrong with my apache config, maybe something to do with MaxRequestsPerChild 0? I have tried many permutations of MaxRequestsPerChild and other settings. I have also read through lots of tutorials for apache/tomcat/mod_jk but I can't seem to figure out why this is happening. Do I need to start using the worker mpm or prefork? Thanks!

Jason Joseph

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

Reply via email to