commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knight, Digby" <Digby_Kni...@hen.invesco.com>
Subject RE: DBCP uses thousands of ports connecting to MySQL on XP (and f ails )
Date Fri, 02 May 2003 15:30:18 GMT
I think my max=4 and min=2, but I'll check all the settings again in case.

Thanks.

-----Original Message-----
From: Karol R├╝ckschloss [mailto:karol.rueckschloss@iqnex.com]
Sent: 02 May 2003 09:51
To: Jakarta Commons Users List
Subject: Re: DBCP uses thousands of ports connecting to MySQL on XP (and
f ails )


Knight, Digby wrote:

>InitialContext ctx = new InitialContext();
>DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/datasource");
>// Working here - found ds okay from <GlobalResources>
>Connection conn = ds.getConnection();
>// Check netstat - thousands of connections to port 3306
>
I had a similar problem with the DBCP / Tomcat integration (pools JNDI 
datasource connections by default). And the solution for my problem was 
quite simple - I misunderstood the resource parameters "maxActive" and 
"maxIdle".
maxActive = amount of connections that are open and put into the pool 
upon first request
... I did the mistake that I put the 30000 in maxActive instead of 
maxIdle ...

Maybe this is relevant to you. I never explicitelly used DBCP, I only 
implicitelly used the DBCP integrated with Tomcat / transparrent 
connection pooling.

KarolR




*****************************************************************
The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.
*****************************************************************


Mime
View raw message