You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kapil Sharma <ka...@kapils.net> on 2003/03/16 20:04:06 UTC

tomcat tuning

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


How to configure Tomcat to request client Certificate?

Posted by Mark Liu <ma...@yahoo.com>.
I am running tomcat 4.1.18 in SSL mode on a Win2K
system.

Suppose my web server wants to see client certificate
which is installed in the IE browser, how do I
configure Tomcat to request the client to send the
cert?

Thanks.

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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


tomcat tuning

Posted by Kapil Sharma <ka...@kapils.net>.
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


RE: tomcat not releasing db connections

Posted by p niemandt <ma...@acesurfer.co.za>.
Not Tomcat's fault: 

Are you using dbcp? If yes, then just make sure that you explicitly
close your connection after using it, preferable in a try /  finally 

If not, then start using a database connection pool, like the one that
comes with Tomcat.

Hope this helps.
Paul



On Mon, 2003-03-17 at 15:33, apachep2 wrote:
> I start my app using a Servlet. When I shut down Tomcat, this Servlet is
> called. In fact, Servlet's detroy method is called. In Servlet's destroy
> method, I free up the db connections and do some other resource cleanup.
> 
> -----Original Message-----
> From: Kapil Sharma [mailto:kapil@kapils.net] 
> Sent: March 16, 2003 6:03 PM
> To: Tomcat Users List
> Subject: tomcat not releasing db connections
> 
> Hi,
> I am using the default setting of tomcat with apache 1.3.27. Tomcat does
> not
> release the db connections. I have keepalive on in my apache settings.
> Are they related in some way to create this problem?
> 
> kapil
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
p niemandt <ma...@acesurfer.co.za>


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


RE: tomcat not releasing db connections

Posted by apachep2 <ap...@hotmail.com>.
I start my app using a Servlet. When I shut down Tomcat, this Servlet is
called. In fact, Servlet's detroy method is called. In Servlet's destroy
method, I free up the db connections and do some other resource cleanup.

-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net] 
Sent: March 16, 2003 6:03 PM
To: Tomcat Users List
Subject: tomcat not releasing db connections

Hi,
I am using the default setting of tomcat with apache 1.3.27. Tomcat does
not
release the db connections. I have keepalive on in my apache settings.
Are they related in some way to create this problem?

kapil


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

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


RE: tomcat not releasing db connections

Posted by Filip Hanik <ma...@filip.net>.
is your code releasing the connections?

Filip

-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net]
Sent: Sunday, March 16, 2003 3:03 PM
To: Tomcat Users List
Subject: tomcat not releasing db connections


Hi,
I am using the default setting of tomcat with apache 1.3.27. Tomcat does not
release the db connections. I have keepalive on in my apache settings.
Are they related in some way to create this problem?

kapil


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



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


tomcat not releasing db connections

Posted by Kapil Sharma <ka...@kapils.net>.
Hi,
I am using the default setting of tomcat with apache 1.3.27. Tomcat does not
release the db connections. I have keepalive on in my apache settings.
Are they related in some way to create this problem?

kapil


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


Re: tomcat monitoring

Posted by Tim Funk <fu...@joedog.org>.
There is none at this time. It appears this kind of functionality is 
coming in the future. (At least to 5)

-Tim

Kapil Sharma wrote:
> Hi,
> Is there any interface for tomcat similar to apache status module? I want to
> monitor the tomcat connections.
> 
> kapil
> 
>  


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


tomcat monitoring

Posted by Kapil Sharma <ka...@kapils.net>.
Hi,
Is there any interface for tomcat similar to apache status module? I want to
monitor the tomcat connections.

kapil


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


Re: tomcat tuning

Posted by Kwok Peng Tuck <pe...@makmal.net>.
Try a pooled database connection. Don't depend on tomcat to timeout db 
connections.
You might want to look at dbcp in the commons project.

Kapil Sharma wrote:

>Thanks for reply. This answers one of the problem. Another problem is db
>connections. I am monitoring db connections and they are just increasing
>even if there is no load on the server. The problem is tomcat is not
>clearing idle connections or timing out the db connections.
>I still cannot understand how tomcat work directory fill up with 6GB of
>space in 24 hours.
>
>kapil
>
>-----Original Message-----
>From: Filip Hanik [mailto:mail@filip.net]
>Sent: 16 March 2003 19:43
>To: Tomcat Users List
>Subject: RE: tomcat tuning
>
>
>the error is that you have a limited number of file descriptor.
>so it doesn't look like your db pool is causing the problem, but your OS
>configuration.
>Increase the number of file descriptors for your system
>
>Filip
>
>-----Original Message-----
>From: Kapil Sharma [mailto:kapil@kapils.net]
>Sent: Sunday, March 16, 2003 11:04 AM
>To: tomcat-user@jakarta.apache.org
>Subject: tomcat tuning
>
>
>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
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>


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


Re: tomcat tuning

Posted by Cédric Viaud <ce...@matrasi-tls.fr>.
Sorry, i was responding to "archive" topic mail.

    Cédric
----- Original Message -----
From: "Cédric Viaud" <ce...@matrasi-tls.fr>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, March 17, 2003 5:37 PM
Subject: Re: tomcat tuning


> Hi,
>
> I, personnaly, search archives using :
> http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2
>
> Hope this helps,
>
>    Cédric
>
> ----- Original Message -----
> From: "Kapil Sharma" <ka...@kapils.net>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, March 17, 2003 5:33 PM
> Subject: RE: tomcat tuning
>
>
> >
> > Hi,
> > Please look at my tomcat confirmation below. I am having problems with
> > database connection now. I am getting the following errors in
catalina.out
> > file:
> > java.sql.SQLException: Error while trying to retrieve text for error
> > ORA-12154
> >
> > I am also unable to login to site. I get the above error. Any solutions?
> >
> >
> > Thanks
> > kapil
> > -----Original Message-----
> > From: Kapil Sharma [mailto:kapil@kapils.net]
> > Sent: 16 March 2003 20:10
> > To: Tomcat Users List
> > Subject: RE: tomcat tuning
> >
> >
> > Thanks for reply. This answers one of the problem. Another problem is db
> > connections. I am monitoring db connections and they are just increasing
> > even if there is no load on the server. The problem is tomcat is not
> > clearing idle connections or timing out the db connections.
> > I still cannot understand how tomcat work directory fill up with 6GB of
> > space in 24 hours.
> >
> > kapil
> >
> > -----Original Message-----
> > From: Filip Hanik [mailto:mail@filip.net]
> > Sent: 16 March 2003 19:43
> > To: Tomcat Users List
> > Subject: RE: tomcat tuning
> >
> >
> > the error is that you have a limited number of file descriptor.
> > so it doesn't look like your db pool is causing the problem, but your OS
> > configuration.
> > Increase the number of file descriptors for your system
> >
> > Filip
> >
> > -----Original Message-----
> > From: Kapil Sharma [mailto:kapil@kapils.net]
> > Sent: Sunday, March 16, 2003 11:04 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: tomcat tuning
> >
> >
> > 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
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: tomcat tuning

Posted by Cédric Viaud <ce...@matrasi-tls.fr>.
Hi,

I, personnaly, search archives using :
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2

Hope this helps,

   Cédric

----- Original Message -----
From: "Kapil Sharma" <ka...@kapils.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, March 17, 2003 5:33 PM
Subject: RE: tomcat tuning


>
> Hi,
> Please look at my tomcat confirmation below. I am having problems with
> database connection now. I am getting the following errors in catalina.out
> file:
> java.sql.SQLException: Error while trying to retrieve text for error
> ORA-12154
>
> I am also unable to login to site. I get the above error. Any solutions?
>
>
> Thanks
> kapil
> -----Original Message-----
> From: Kapil Sharma [mailto:kapil@kapils.net]
> Sent: 16 March 2003 20:10
> To: Tomcat Users List
> Subject: RE: tomcat tuning
>
>
> Thanks for reply. This answers one of the problem. Another problem is db
> connections. I am monitoring db connections and they are just increasing
> even if there is no load on the server. The problem is tomcat is not
> clearing idle connections or timing out the db connections.
> I still cannot understand how tomcat work directory fill up with 6GB of
> space in 24 hours.
>
> kapil
>
> -----Original Message-----
> From: Filip Hanik [mailto:mail@filip.net]
> Sent: 16 March 2003 19:43
> To: Tomcat Users List
> Subject: RE: tomcat tuning
>
>
> the error is that you have a limited number of file descriptor.
> so it doesn't look like your db pool is causing the problem, but your OS
> configuration.
> Increase the number of file descriptors for your system
>
> Filip
>
> -----Original Message-----
> From: Kapil Sharma [mailto:kapil@kapils.net]
> Sent: Sunday, March 16, 2003 11:04 AM
> To: tomcat-user@jakarta.apache.org
> Subject: tomcat tuning
>
>
> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


RE: tomcat tuning

Posted by Kapil Sharma <ka...@kapils.net>.
Hi,
Please look at my tomcat confirmation below. I am having problems with
database connection now. I am getting the following errors in catalina.out
file:
java.sql.SQLException: Error while trying to retrieve text for error
ORA-12154

I am also unable to login to site. I get the above error. Any solutions?


Thanks
kapil
-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net]
Sent: 16 March 2003 20:10
To: Tomcat Users List
Subject: RE: tomcat tuning


Thanks for reply. This answers one of the problem. Another problem is db
connections. I am monitoring db connections and they are just increasing
even if there is no load on the server. The problem is tomcat is not
clearing idle connections or timing out the db connections.
I still cannot understand how tomcat work directory fill up with 6GB of
space in 24 hours.

kapil

-----Original Message-----
From: Filip Hanik [mailto:mail@filip.net]
Sent: 16 March 2003 19:43
To: Tomcat Users List
Subject: RE: tomcat tuning


the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net]
Sent: Sunday, March 16, 2003 11:04 AM
To: tomcat-user@jakarta.apache.org
Subject: tomcat tuning


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



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


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


RE: tomcat tuning

Posted by Kapil Sharma <ka...@kapils.net>.
Thanks for reply. This answers one of the problem. Another problem is db
connections. I am monitoring db connections and they are just increasing
even if there is no load on the server. The problem is tomcat is not
clearing idle connections or timing out the db connections.
I still cannot understand how tomcat work directory fill up with 6GB of
space in 24 hours.

kapil

-----Original Message-----
From: Filip Hanik [mailto:mail@filip.net]
Sent: 16 March 2003 19:43
To: Tomcat Users List
Subject: RE: tomcat tuning


the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net]
Sent: Sunday, March 16, 2003 11:04 AM
To: tomcat-user@jakarta.apache.org
Subject: tomcat tuning


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



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


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


RE: tomcat tuning

Posted by Filip Hanik <ma...@filip.net>.
the error is that you have a limited number of file descriptor.
so it doesn't look like your db pool is causing the problem, but your OS
configuration.
Increase the number of file descriptors for your system

Filip

-----Original Message-----
From: Kapil Sharma [mailto:kapil@kapils.net]
Sent: Sunday, March 16, 2003 11:04 AM
To: tomcat-user@jakarta.apache.org
Subject: tomcat tuning


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



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