Stephen A. Cochran Lists wrote:
Anyone see a problem with running out of connections to postgres? I'm
getting the following error on the "projects" page:
FATAL: connection limit exceeded for non-superusers
And looking in the postgresql pg_stat_activity view, I see there are 100
open connections, and they are all from trac projects. I can guarantee
that there aren't 100 people using trac right now.
Has anyone else seen a problem with trac no closing database connections
to postgres?
Yes I have the exact same problem, and I'm actively tracking it. I've
spoken with cmlenz and jborg in #trac on IRC and I'm trying some things.
I thought it was that db.close() isn't being called, so the connections
aren't returned to the pool. But the connections should be
garbage-collected at the end of the request. I've also done some work
with the 'gc' module, tracking what is collectable or not by the garbage
collector. The thought here is that something is keeping a reference to
the connection and it can't be collected at the end of the request when
everything is done. I'm still not sure yet, but I'll keep you posted on
my progress.
Cheers,
BA
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac