Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jason,
On 6/4/2009 5:06 PM, Jason Joseph wrote:
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.
Why were you testing a configuration different from your production plans?
We ran into some performance issues towards the end of development and
after reading things online I thought the best practice for production
environments was for tomcat to handle dynamic requests and apache to
handle static content. Based on what Chuck said though, is this wrong?
Also to clarify we are using Websphere Application Server Community
Edition which utilizes Geronimo. I was under the impression that under
all that was Tomcat, maybe I am wrong though.
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.
Could keepalive be an issue? If you use wireshark or some other
line-sniffer, can you see if the request for employerBriefcase.action is
the first of many requests in a single keepalive HTTP connection for
Tomcat, but you get separate connections for httpd?
In both cases there are multiple http requests being fired and not a
single keepalive but I will keep looking into this to make sure its not
a keepalive related issue.
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.
Does this happen ever time?
Yes it happens exactly the same way each time.
Tomcat Config.xml
<attribute name="minSpareThreads">25</attribute>
<attribute name="maxSpareThreads">75</attribute> <attribute
name="enableLookups">false</attribute>
Hmm... I've never heard of Config.xml. This may be a configuration
option that I've just never encountered. Oh, wait, you're using
websphere (didn't know you could use Tomcat with websphere... <shrug>).
You might have to go to the websphere folks to see if anything is
happening on their end.
As I stated above I guess its Geronimo and Tomcat underneath but I could
be completely wrong on this. It seems to mimic a lot of Tomcats config
stuff so Im assuming that the case.
Worker Config
worker.list=geronimo_ajp13
worker.geronimo_ajp13.port=8009
worker.geronimo_ajp13.host=localhost
worker.geronimo_ajp13.type=ajp13
All looks fine.
I assume its something wrong with my apache config, maybe something to
do with MaxRequestsPerChild 0?
I can't imagine that MaxRequestsPerChild would contribute to this
problem. Maybe if you had MaxRequestPerChild set to 1 I might believe
it, but you have it set to "0" which means "children never die".
Wouldn't MaxRequestPerChild set to 1 force the server to start a new
process for every new HTTP request it got? I was hoping when I set it to
1 it would fix the issue even if thats definitely not the right way to
go about doing it moving forward but still seemed to be the same issue.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkooOwQACgkQ9CaO5/Lv0PDTiwCeOSZ7t1kcaMNZDpbpZyF5+DWb
6mQAnRJw7uRXq2ulV+5Cxxdtyh15uKyn
=rbzs
-----END PGP SIGNATURE-----
I guess I will keep digging around to see if I can figure out why this
might be happening but I appreciate the help! Also I apologize if I am
replying to this incorrectly, haven't used mailing lists in years :)
Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org