Re: Connection pool issues with clsql

Ralf Mattes <rm-OuoMP45H64u6ogTlOYt/[email protected]>
Newsgroups gmane.lisp.clsql.general
Message-ID <1265206625.6557.5.camel@mhflaptop01>
On Tue, 2010-02-02 at 17:12 -0500, Nathan Bird wrote:

> 
> >From what I recall looking at, connection pooling still has some
> potential for race conditions from here:
> http://lists.b9.com/pipermail/clsql/2009-June/001717.html.

That one got fixed - see the change log entry:

 02 Jun 2009  Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
        * Version 4.0.5
        * sql/database.lisp: Add process-lock for deleting database from
        a pool (thanks to Ralf Mattes).


But we still have some "issues" with connection pooling. One nagging
problem we repeatedly run into: the pool never realeases connections, so
if you have a peek of parallel connections the pool keeps them hanging
around.

 HTH Ralf Mattes
 
> Also if you are using view-class objects, each object stores its
> connection and uses that one, so if you return a connection to the pool
> it can still be referenced and used by an object even as another object
> is trying to use that same connection in a different thread. I.e. don't
> let objects outlive a connection to the database.
> 
> Also there are a couple of patches here:
> http://github.com/UnwashedMeme/clsql/commits/uncontroversial/sql/pool.lisp
> that have not yet been merged into master (they're on the list) attempt
> to verify that a connection gotten from the database is still in working
> order--normally another query to the database to ensure validity. This
> still tends to be faster than building a new connection altogether.
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.