I'd just add to Jon's answer that setting a maxWait to 0 will help you to identify these issues, otherwise it can hides some undersizing problem during the tuning phase.
Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance> Le ven. 28 sept. 2018 à 16:24, Jonathan Gallimore < [email protected]> a écrit : > I tend to run with small connection pools and only increase them if its > really necessary. If you do have something leaking a connection somewhere, > its worth solving that rather than increasing the pool size. That said, I'd > say a maxactive of 2 is very small, and maybe 10 would be a good starting > point. If you're seeing most of your connections in use all the time at > that point, get some thread dumps and maybe some timings on your queries to > make sure nothing is getting stuck. > > Jon > > On Fri, Sep 28, 2018 at 3:17 PM clemensx <[email protected]> wrote: > > > We have very long background processes working intensively with the DB. > So > > I > > would guess that at least one connection is almost always in use. Two > just > > is too few connections. Even if a much larger pool would maybe not really > > solve the problem, it would at least make it much less severe. > > > > If we last around a day currently with two connections, my guess would be > > to > > last many days with many more connections... > > > > > > > > -- > > Sent from: > > http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html > > >
