tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
Date Thu, 20 Jun 2002 14:07:36 GMT
Howdy,
I know you already solved the problem (was userid).

As an aside, it's a bad idea to unpack 3rd party jars.  You probably
want to rename classes12.zip to classes12.jar so tomcat will pick it up.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Victor Popiol [mailto:vpopiol@douwantit.com]
>Sent: Thursday, June 20, 2002 4:24 AM
>To: Tomcat Users List
>Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
>
>Hi. I installed Tomcat 4.1.3 and deployed my application. But I
>consistently get en error trying to connect to our database. This error
>only happens in Tomcat 4.1.3.
>
>The database is Oracle 8.1.7 and I expanded the classes from the
>classes12.zip JDBC distributable (as I had done on Tomcat 4.03).
>
>The error happens when trying to open the connection. To isolate the
issue,
>I wrote a small jsp page that exercise the data source to get the
>conection. Here it is:
>
><%@ page contentType="text/html"
>import="javax.naming.*,java.sql.*,javax.sql.*" %>
><html>
><body>
><%
>	System.out.println("Starting<BR>");
>	Context initCtx = new InitialContext();
>	Context envCtx = (Context) initCtx.lookup("java:comp/env");
>	DataSource ds = (DataSource)
>	  envCtx.lookup("jdbc/duwi");
>	if (ds != null) {
>		System.out.println("Data Source is not null<BR>");
>		Connection conn = ds.getConnection();
>		conn.close();
>	}
>%>
>Ready!
></body>
></html>
>
>The execution of this jsp throwas the following exception:
>
>org.apache.jasper.JasperException
>	at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
ava:
>232)
>	at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289
)
>	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:247)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>ava:191)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
49)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:644)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>1)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:644)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a:174)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>	at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
05)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:376)
>	at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:518)
>	at java.lang.Thread.run(Thread.java:479)
>
>
>root cause
>
>java.lang.NullPointerException
>	at java.util.Hashtable.put(Hashtable.java:375)
>	at
org.apache.commons.dbcp.BasicDataSource.createDataSource(Unknown
>Source)
>	at org.apache.commons.dbcp.BasicDataSource.getConnection(Unknown
>Source)
>	at org.apache.jsp.test$jsp._jspService(Unknown Source)
>	at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
ava:
>188)
>	at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289
)
>	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:247)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>ava:191)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
49)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:644)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>1)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:644)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a:174)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:646)
>	at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
483)
>	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>	at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>	at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
05)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:376)
>	at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:518)
>	at java.lang.Thread.run(Thread.java:479)
>
>Any ideas?
>
>Thanks
>Victor
>
>
>
>-------------------------------
>Thanks.
>
>We'll try it and let you know.
>
>Regards
>Victor
>
>-----Original Message-----
>From: Remy Maucherat [mailto:remm@apache.org]
>Sent: Wednesday, June 19, 2002 1:04 PM
>To: Tomcat Users List
>Subject: Re: Tomcat 4 performance issues
>
>
>Victor Popiol wrote:
>> Hi all.
>>
>> We have deployed a new web application to our production server and
have
>noticed that the performance is terrible.
>>
>> We then configured 2 test environments running Tomcat 4 and JRun 4.
After
>testing we determined that JRun's performance (out of the box) is
orders of
>magnitude better than Tomcat's.
>>
>> We believe that our Tomcat configuration could be twicked to improve
>performance.
>>
>> These are the details about our deployment:
>> - Win 2K, 1 CPU 700 Mhz, 512 M Ram
>> - IIS front end using isapi_redirector.dll
>> - One Tomcat instance
>> - Minimum memory (-Xms) is 128 MB. Maximum memory is 256 MB
>> - Server logging includes the Access Log
>> - Application uses Struts
>>
>> We have twicked the AJP connector to preallocate 100 threads, grow up
to
>200 and allow a queue of up to 50 requests. We have never reached these
>limits.
>>
>> The main and evident symptom is that the requests to Tomcat seam to
be
>serialized and handled one by one. Also the CPU utilization is pegged
at
>100% while the requests are being served.
>>
>> Before making a decision to replace Tomcat, I would like to hear some
>advice regarding configuration and tuning.
>
>Applications with pages having lots of tags can be very slow when using
>Sun JVMs because of a Sun JVM bug.
>Jasper 2 (included in Tomcat 4.1.3 Beta) fixes the code it generates,
so
>that we don't trigger the JVM bug anymore.
>
>IMO, you should try Tomcat 4.1.3 to see if it helps.
>
>Remy
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message