Greetings all.

Ok we are experiencing some very odd things within Tomcat 5.0.19.  I believe
that we may be trying to do much with Tomcat and Apache - but I will let you
guys decide for yourself.

Ok, the scenario is as follows:

The Server (Dev):
===============================================================

PIII 733Mhz
20GB SCSI 
512MB RAM 
Win2k Server

Apache 2.0.46
Tomcat 5.0.19
J2SDK 1.4.2_01
mod_jk2.04

About the setup:  (example conf entries at the end of the mail)
===============================================================

We have setup 1 AJP1.3 Connector (the tc5 Coyote Connector) to service the
Apache --> Tomcat comms using the default channel socket on port 8009.

In Apache we have 25 name based VirtualHosts set up - each using the
JkUriSet directive to forward JSP and servlet requests to Tomcat.

In Tomcat we have all 25 hosts set up using the Tomcat <Host /> blocks -
each <Host /> has its own <Context /> pointing at the correct location on
the drive for the site context ROOT.

The AJP1.3 connector on 8009 is setup to run with the defaults except for
maxPostSize, which we have set to 0 (unlimited).

Each Apache VirtualHost sends the Tomcat related requests to Tomcat using
the same worker (ajp13:localhost:8009) - is this a potential problem?

All the sites are utilising a custom tag library (thaty we developed).
There are a large number of tags in the library - some of which (for legacy)
utilise TEI classes.

In order to get around memory issues Tomcat is started with the following VM
Settings:

-Xms128m -Xmx256m -XX:+UseParallelGC

Other configuration notables:

We have disabled Tag Pooling on a global level.

The problems:
===============================================================

We are two major problems:

1.  First request to sites are causing problems with TEI classloading - even
though the classes ARE in fact in the WEB-INF/classes location of the
relevant web app.

2.  Load - when we run load tests on the server we have major issues.  The
sites run REALLY slowly - our test is a custom written load tester that
parses apache request logs for the exact test sites we have on the box (the
live equivs) and duplicates the requests - except we can configure the
number of concurrent requests to run the test on.  The page responses are
REALLY slow after a while and we also get IOExceptions occurring.

Diagnosis
===============================================================

After a fair amount of investigation we have made the following tentative
conclusions (however - the reason for this post to the list is to see what
you all think of this):

1.  The number of concurrent requests and the fact that pages and the
request reponse times are getting slow cause a major bottleneck in Tomcat -
which leads to the piling up of queued requests - until the acceptCount is
reached - and the server becomes totally unresponsive.

2.  GC - the JVM is not able to handle the GC of so many concurrent threads
- which in turn leads to unresonsive threads/requests.

3.  The classloading issue in tomcat for TEI classes - ???  Is this a known
bug in 5.019?

Conf and Error examples:
===============================================================

Apache httpd.conf
----------------------------------------------------------------------------
-----

# AFFINITYCARES PUBLIC SITE
<VirtualHost 192.168.128.7>
 ServerAdmin [EMAIL PROTECTED]
 ServerName www.aff.com
 DocumentRoot "C:\www\AffinityCares\ROOT"
 Alias /userimages "C:\www\AffinityCares\userimages"
 CustomLog "C:\pb\logs\AffinityCares\www.affinitycares.com_apache.log"
combined
 <Location "/*.jsp">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/servlet/*">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/SiteSchedulerServlet">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/cacheservlet">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/dataimport">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/imagegen/*">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/WEB-INF/*">
        JkUriSet worker ajp13:localhost:8009
 </Location>
 <Location "/download/*">
        JkUriSet worker ajp13:localhost:8009
 </Location>
</VirtualHost>

The Tomcat server.xml conf example
-------------------------------------------------------------------

<!-- AFFINITYCARES PUBLIC SITE HOST BLOCK -->
<Host name="www.aff.com" deployOnStartup="false" autoDeploy="false" >
        <Context path="" docBase="C:\www\AffinityCares\ROOT"
reloadable="true" />
</Host>

The exception stacktrace for the TEI classloading
-------------------------------------------------------------------

ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException:
com.platform_basic.util.taglib.PageControlTEI
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1383)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1230)
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoIm
pl.java:453)
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:291)
        at
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java
:205)
        at
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
        at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:171)
        at
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:25
8)
        at
org.apache.jasper.compiler.ParserController.parse(ParserController.java:139)
        at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
53)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
91)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
        at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:750)
        at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDis
patcher.java:510)
        at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:445)
        at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:359)
        at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712
)
        at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
        at
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:827)
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:800)
        at org.apache.jsp.vote.index_jsp._jspService(index_jsp.java:229)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
11)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:284)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:204)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:257)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:245)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:199)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184
)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164
)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:149)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:156)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339)
        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716)
        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650)
        at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:688)
        at java.lang.Thread.run(Thread.java:534)

I look forward to any assistance that you may be able to give!

Regards,

Carl Olivier

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

Reply via email to