> 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.

Err... amazing that no one else experienced issues with this.
After all not only people using short-lived threads will have their
connections piling up. AFAICS the connections only get closed
on CLOSE-STORE, which is independent from thread running time.

Here's a remedy:

(defun pm-reap (sc)
  (maphash (lambda (thread bookkeeper)
             (let ((alive-p (sb-thread:thread-alive-p thread)))
               (unless alive-p
                 (cl-postgres:close-database (car bookkeeper))
                 (remhash thread (controller-db-table sc)))))
           (controller-db-table sc)))

I'm not sure how to integrate this best, though. The threading
stuff is not portable (do we have Bordeaux as dependency? Guess
not), so others here would have to provide that stuff for their
Lisps.

  Leslie

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

Reply via email to