-
1. Re: Gradual Leak in Database Connection
fghalib Feb 4, 2005 6:58 AM (in response to fghalib)Re writing everything, there was some probelm when I created the post.
System Info:
JBoss Ver 3.2.4
Oracle 9.2
DataSource Setting in Oracle-ds.xml
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@localhost:1521:taxidb</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>pdev</user-name>
pdev123
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<min-pool-size>0</min-pool-size>
<max-pool-size>80</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
</local-tx-datasource>
Syptoms
In a live system I am losing around 10 connections per day.
In ManagedConnectionPool for Oracle (JMX COnsole)
AvailableConnectionCount + InUseConnectionCount decrease gradually from 80
ConnectionCreatedCount - ConnectionDestroyedCount always equals to ConnectionCount
Remedies tried
Double checking that all database accesses in the code do not lose connections by proplerly closing statements, resultsets and connections in the following manner
finally{
try
{
statement.close();
}
catch (Exception e){}
try
{
resultset.close();
}
catch (Exception e){}
try
{
connection.close();
}
catch (Exception e){}
}
Added following to log4j
category name="org.jboss.resource.connectionmanager"
priority value="TRACE" class="org.jboss.logging.XLevel"
category
category name="org.jboss.resource.adapter.jdbc"
priority value="TRACE" class="org.jboss.logging.XLevel"
category
And also tried keeping in deply\transaction-service.xml
attribute name="SpecCompliant" false
attribute name="Debug" true
I am unable to see anything special in the logs. Can some one suggest what I am missing or what is the best course of action I should take?
Thanks for your help in advance -
2. Re: Gradual Leak in Database Connection
adrian.brock Feb 4, 2005 8:51 PM (in response to fghalib)Moderated: As stated in "READ THIS FIRST" you ain't going to get many answers if
you haven't tested with the latest version 3.2.7/4.0.1 at time of writing.