cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lon Varscsak <lon.varsc...@gmail.com>
Subject Re: Reconnecting automatically after DB downtime
Date Wed, 09 Mar 2016 20:51:43 GMT
This was a great thread (even though I tried to hijack it :P).  I’m now
using Hikari too. :D

-Lon

On Wed, Mar 9, 2016 at 12:40 PM, Andrus Adamchik <andrus@objectstyle.org>
wrote:

>
> > On Mar 9, 2016, at 7:34 AM, Andrus Adamchik <andrus@objectstyle.org>
> wrote:
> >
> >>
> >> On Mar 9, 2016, at 12:52 AM, Hugi Thordarson <hugi@karlmenn.is> wrote:
> >>
> >> Nice, works like a charm :).
> >>
> >> On a side note, websites that I’ve switched to HikariCP have been up
> since the switch, so it does seem to have been a problem with Cayenne’s
> connection pool.
> >
> > Yeah, I'll jira that. Will need to investigate.
>
> The problem wasn't what I originally thought it was. Instead what happened
> is this: at the moments when the DB was down,
> UnmanagedPoolingDataSource.createUnchecked(..) would decrement a semaphore
> controlling max pool size without creating a connection. So any DB hiccup
> would result in permanent pool shrinkage.
>
> Just fixed it per https://issues.apache.org/jira/browse/CAY-2067 .
>
> (Lack of) fair scheduling limitation mentioned by John still exists. So
> when there is a contention, failure rate may be higher then it would be
> with fair scheduling (I observed this in my unit tests, even though I
> wasn't specifically testing this condition). Shouldn't be an issue if the
> pool has enough connections.
>
> Still a third party pool is probably a better choice for production. Like
> I said, our pool is intentionally basic.
>
> Andrus

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message