You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/02/15 03:33:28 UTC

[jira] Closed: (DBCP-275) removeAbandoned parameter not working

     [ https://issues.apache.org/jira/browse/DBCP-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed DBCP-275.
----------------------------


> removeAbandoned parameter not working
> -------------------------------------
>
>                 Key: DBCP-275
>                 URL: https://issues.apache.org/jira/browse/DBCP-275
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>         Environment: Windows XP,Tomcat 5.5.12,My SQL 5.0.68 Enterprise version,java 1.5
>            Reporter: Venkata Kiran
>             Fix For: 1.2.2
>
>
> Hi,
>          Iam using tomcat connection pooling to maintain db connections.
> The following configurations were made in context.xml.
> <Resource name="jdbc/testdb" auth="Container"
> type="javax.sql.DataSource" 
> username="root" password="root123"
> driverClassName="com.mysql.jdbc.Driver" 
> url="jdbc:mysql://localhost:3306/test35_dev"
> maxActive="-1" 
> maxIdle="10" 
> minIdle="6" 
> maxwait="5000" 
> minEvictableIdleTimeMillis="30000"
> numTestsPerEvictionRun = "25"
> timeBetweenEvictionRunsMillis="30000"
> removeAbandoned="true"
> removeAbandonedTimeout="60"
> />
> I used the following code to look up and get the data base connections
> Context initCtx = new InitialContext();
> Context envCtx = (Context) initCtx.lookup("java:comp/env");
> // Look up our data source
> DataSource ds = (DataSource) envCtx.lookup("jdbc/testdb");
> // Allocate and use a connection from the pool
> Connection connection = ds.getConnection();
> After this the application is creating 50 connections and it is not  closing
> the connections after using.Will removeAbandoned step in and return the
> connections to the pool and remove the excess connections greater than maxIdle
> parameter.But when the application needs the next set of connections it is
> creating new connections instead of using the existing ones and as a result the
> MySql server is running out of connections.Why is removeAbandoned not handling
> the unclosed connections even after 1 minute even though it is configured to do
> so.
> Please advise on the possible solutions.
> Thanks

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.