I'm using Hibernate 2.1 together with c3p0 0.8.4.5 and a
In my application I have a server running some 100
threads from a pool, each serving a client, several 100
clients at a time.
c3p0 is configured with 50 initial connection, limit of 100,
increment of 1. MySql is limited to 100 connections.
Sometimes (not on all runs) I observed that mySql
rejected new connection with the following exception:
java.sql.SQLException: Data source rejected
establishment of connection, message from server: "Too
When checking in more detail I found that in the
postAcquireMore of BasicResourcePool the number of
managed resources grew much slower than the number
of pending_acquires and num_desired.
This lets me come to the conclusion that more and more
worker threads become active much faster than a new
conenction is established and available.
Is this a correct observation?
Another point that I do not understand: Why do I see no
release of connections coming back to the pool? This
should help fulfilling all requirements. Did you observe
such a behaviour before? And how can I resolve it?