On 9/2/2011 1:59 PM, Chris Hostetter wrote:
: I am not sure if current version has this, but  DIH used to reload
: connections after some idle time
:
: if (currTime - connLastUsed>  CONN_TIME_OUT) {
:                       synchronized (this) {
:                               Connection tmpConn = factory.call();
:                               closeConnection();
:                               connLastUsed = System.currentTimeMillis();
:                               return conn = tmpConn;
:                       }
:
:
: Where CONN_TIME_OUT = 10 seconds

...oh wow.  i saw the CONN_TIME_OUT constant but i thought (foolishly
evidently) that CONN was "connect" as it a timeout on creating a
connection, not a timeout on how long DIH is willing ot use a perfectly
good connection.

I honestly can't make heads or tails of why that code would exist.

Noble? Shalin?  what's the point of throwing away a connection that's been
in use for more then 10 seconds?

I use DIH with MySQL. When things are going well, a full rebuild will leave connections open and active for over two hours. This is the case with 1.4.0, 1.4.1, 3.1.0, and 3.2.0. Due to some kind of problem on the database server, last night I had a rebuild going for more than 11 hours with no problems, verified from the processlist on the server.

Thanks,
Shawn

Reply via email to