tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kapil Sharma" <ka...@kapils.net>
Subject tomcat tuning
Date Sun, 16 Mar 2003 19:42:19 GMT
Hi Guys,
I am facing a performance issue with tomcat 4.1.12 on Solaris. Following is
my setup

apache 1.3.27
tomcat 4.1.12
ajp 13

Following is my server.xml context for database and tomcat-apache connector

    <ResourceParams name="jdbc/foo">
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:oci8:@foo</value>
      </parameter>
      <parameter>
        <name>validationQuery</name>
        <value>select 1 from dual</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>0</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>255</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
      <parameter>
        <name>maxWait</name>
       <value>30000</value>
      </parameter>
      <parameter>
        <name>removeAbandoned</name>
        <value>true</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>test</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>test</value>
      </parameter>
      <parameter>
        <name>factory</name>
        <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
      </parameter>
      <parameter>
        <name>removeAbandonedTimeout</name>
        <value>300</value>
      </parameter>
    </ResourceParams>

   <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               acceptCount="20"
               bufferSize="2048"
               connectionTimeout="20000"
               debug="4"
               enableLookups="false"
               maxProcessors="255"
               minProcessors="21"
               port="8009"

protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
               proxyPort="0"
               redirectPort="8443"
               scheme="http"
               secure="false"
               tcpNoDelay="true"
               useURIValidationHack="false">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>

    </Connector>

Following are the problems.

I changed some parameters in the server.xml file to match the number of
apache connections. I was also having heavy load on tomcat so I had to
increase the database connections. Now the problem is tomcat is not closing
the database connections and database pool is filling up. Tomcat filled up
the system partition to 100% and threw the following errors for some reason:

exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
        at java.net.ServerSocket.implAccept(ServerSocket.java:439)
        at java.net.ServerSocket.accept(ServerSocket.java:410)
        at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:107)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java
:335)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:483)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:536)


Can anyone help me with this problem and refer me to some good docs for
tomcat setup and performance issues for production heavy loaded servers?

Thanks
kapil



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


Mime
View raw message