Ah, you have alot of short-lived threads? A quick look at pm- controller.lisp seems to indicate that pm-postmodern does not close connections when the thread closes.

Perhaps you can add a function to do this explicitly or better, simply scan through active threads and cull any connections for which the opening thread has been terminated. If you do this only when a new connection is being opened, and the thread count is reasonable, this should be cheap. I think there are some lisp-independent thread abstractions in elephant-utils. If not, we might import one for (get- all-threads) and some unique identifier per thread.

Check out pm-controller.lisp for details.

Ian

On Feb 26, 2008, at 1:38 PM, Leslie P. Polzer wrote:


Sounds like you're opening to many connections to the db.  How many
threads do you have?  Each thread opens it's own socket to the server
so if you have 100 threads, you have 100 connections to the server.

Well, like I pointed out in my first mail, the threads are very few.
They make peak to five or a bunch more, but most of that won't access
the database. The main problem is that the idle workers don't get
reaped by PG...

 Leslie

--
My personal blog: http://blog.viridian-project.de/

_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel

Reply via email to