Re: [c3p0-users] delaying the acquisition of new database connections
Status: Beta
Brought to you by:
swaldman
From: Steve W. <swa...@mc...> - 2014-07-22 10:47:35
|
alas, there is not for now a way to specify a delay between Connection acquisition attempts. one thing you could do is something i generally disrecommend: set acquireIncrement to 1. usually this is a bad idea, as it means that while the pool expands, some client must wait for each Connection acquisition. to minimize the number of clients that experience the latency of Connection acquisition, letting pressure trigger multiple “prefetched” acquisitions is usually the way to go. but if you prefer that clients experience a bit of latency than very rapid demand for Connections on the server side (which it seems clear that you do), acquireIncrement of 1 may help, a little. still, there’s no way to slow c3p0’s attempts to acquire new Connections to a pace slower than actual client demand. we’d have to add an explicit delay to make that happen. smiles, steve On Jul 22, 2014, at 11:33 AM, Simon Kulessa <ku...@fl...> wrote: > Hi, > > is there a way to tell c3p0 to delay the acquisition of new database > connections? > > Basically if our Server comes under load and the number of needed > database connections goes > up from 10 to 1000, c3p0 requests all these database connections in a > very short interval of time. > > Apparently on an oracle database a logon consumes around 2 MB, so > requesting a large number > of new connections requires a lot of memory on database size. The > problem is that this much memory > might not be available at once and causes problems of the performance of > the database server. > > So I am looking for a way to limit the amount of new connections that > can be acquired in a certain interval of time. > I don't see any matching parameters that could be used. > > c3p0 and hibernate version is 4.1.4.Final. > > Regards, > Simon Kulessa > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > c3p0-users mailing list > c3p...@li... > https://lists.sourceforge.net/lists/listinfo/c3p0-users |