Stephen A. Cochran Lists wrote: > Is there a ticket number? I was not sure if the issue was crappy code in my plugins, which use a central database across all projects. Unless you're using the DbAuthPlugin, then we can maybe eliminate that, and know that the problem is in Trac (as well as my plugins...)
Go ahead and start a ticket, if you want. > > I have a system with 14 projects set up, each with it's own database > and username. So within a few days every httpd process will be holding > a db connection for every trac project it's served out. Restarting > apache seems to close all the database connections, so that's an easy fix. We have 70 projects, but only about 25 are active and using Trac. And indeed, on an Apache restart, everything is fine, but it takes a while to clean up the Apache threads and the idle connections. > > Found some interesting info here: http://www.modpython.org/pipermail/ > mod_python/2003-September/014154.html > > Doesn't explain where the caching might be happening, but still > interesting reading. I'll take a look. Thanks. > > Here's some more strange things. After restarting apache, there's no > database connections. Visiting one trac project created five new > postgres connections: > > # ps -ef | grep postgres > postgres 11751 10767 0 10:05 ? 00:00:00 postgres: webAuth > webAuth [local] idle > postgres 11752 10767 0 10:05 ? 00:00:00 postgres: webAuth > webAuth [local] idle > postgres 11753 10767 0 10:05 ? 00:00:00 postgres: webAuth > webAuth [local] idle > postgres 11754 10767 0 10:05 ? 00:00:00 postgres: webAuth > webAuth [local] idle > postgres 11755 10767 0 10:05 ? 00:00:00 postgres: webAuth > webAuth [local] idle I see a combination of 'idle' as above, and 'idle in transaction' > > template1=# select * from pg_stat_activity; > 35167 | webAuth | 11755 | 111 | webAuth | | > 35167 | webAuth | 11754 | 111 | webAuth | | > 35167 | webAuth | 11753 | 111 | webAuth | | > 35167 | webAuth | 11752 | 111 | webAuth | | > 35167 | webAuth | 11751 | 111 | webAuth | | Some of these are blank, and some actually say 'idle' for me. The same problem exists when I use tracd instead of mod_python/apache, and where I wasn't able to create it on my local, now I can. So I have a good test / debugging platform now. Keep me up to date, and I'll do the same. BA _______________________________________________ Trac mailing list [email protected] http://lists.edgewall.com/mailman/listinfo/trac
