commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [DBCP] Too many connections issue...
Date Wed, 26 Jan 2011 01:05:19 GMT
On Tue, Jan 25, 2011 at 4:39 PM, Suny kk <> wrote:
> Hi Phil,
> Yes, I'm using BasiDataSource well, Is it because of my DBCP settings?
> Remember I got this exception when I started my application on different
> machine with same database.

Well, if the first instance starts and uses the full 500 max
connections, then that could explain why the second instance cannot
get any connections from the database (assuming the database itself
cannot handle more than 500 connections).

As I said below, the error that you are getting means that when the
application starts the database does not have connections available to
provide to the pool.  You should check and confirm:

0) Is the application closing all connections that it opens?  You can
quickly max the pool connections if your code does not return
connections to the pool.  Your configuration allows 500 connections to
be opened by the pool concurrently.  You should observe the actual
database engine connection counts and see if your app is getting near
the max.  Given that you have maxIdle set at 8, if you are hitting
high connection count numbers either you have some very long-running
queries and large load spikes, or your code is abandoning connections
(not closing them).

1) Are other applications or processes consuming available database connections?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message