On Nov 21, 2012, at 5:36 AM, Milan Tomic wrote:

> 
> After 1 month of Tomcat 6.0.18 running,

That's a really old version, you should strongly consider upgrading to the 
latest Tomcat 6.0.x or 7.0.x release.

> I have 50 opened JDBC connections, which should be closed, but they aren't.

How are you determining this? Are you looking at open connections from your 
database?  Are you looking at JMX stats for the connection pool?

> All connections have first or second stack trace:
> 
> TP-Processor22
> java.net.SocketInputStream.socketRead0(Native Method)
> java.net.SocketInputStream.read(SocketInputStream.java:129)
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:620)
> org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:558)
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:685)
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
> java.lang.Thread.run(Thread.java:662)
> 
> TP-Processor29
> java.lang.Object.wait(Native Method)
> java.lang.Object.wait(Object.java:485)
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
> java.lang.Thread.run(Thread.java:662)

These don't really seem to be indicating any sort of problem.  The first looks 
like it is reading data from a socket, the second is simply waiting for 
something to do.  

> 
> Those are my connection pool settings:
> 
> <Resource name="jdbc/myDS" auth="Container" 
> type="oracle.jdbc.pool.OracleDataSource"
>                connectionCacheProperties="{InitialLimit=3, MinLimit=3, 
> MaxLimit=100, AbandonedConnectionTimeout=900, InactivityTimeout=1800, 
> PropertyCheckInterval=60, ValidateConnection=true}"
>                connectionCachingEnabled="true"
>                user="myuser" password="mypass" 
> factory="oracle.jdbc.pool.OracleDataSourceFactory"
>                driverClassName="oracle.jdbc.OracleDriver" 
>                url="jdbc:oracle:thin:@someip:1521:myDB"
>                />

This looks fairly normal with the exception that you are using an 
OracleDataSource.  Not sure how much this list will be able to help you if the 
problem is with the connection pool.  You'd probably need to contact Oracle.

Dan


> What am I doing wrong? I am closing DB connections from my Java code, but 
> even if I fail to close, it should be automatically closed after some period 
> (timeout)?
> 
> Thank you in advance,
> Milan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to