on Sun May 18 2008, Jonas Borgström <jonas-AT-edgewall.com> wrote:
> David Abrahams wrote: >> We haven't upgraded our Trac in some time, so we're still using a >> slightly older 0.11-dev, but recently we have been having regular -- >> often daily -- episodes where our PostgreSQL connection starts throwing >> >> >> File >> "/usr/local/lib/python2.5/site-packages/django/db/backends/postgresql_psycopg2/base.py", >> line 69, in _cursor >> self.connection = Database.connect(conn_string, **self.options) >> >> OperationalError: FATAL: connection limit exceeded for non-superusers >> >> >> Obviously something is leaking DB connections. This does seem a bit >> familiar. > > Well, this might not be a leak per se. You're not hosting a large number > of Trac environments using the mod_python frontend by any chance? No, I'm hosting a large number of environments using TracForge with fastcgi... > If so it might be worth looking into switching to fastcgi, since > mod_python with apache in prefork mode will (after a while) keep a lot > more connections open. ...but I think we get the same effect that way. > I have actually been thinking about making Trac use a single global db > pool instead of one pool for each environment in each process. Yep, that's what we need, or something very like it. Of course, each of my environments connects with a different schema and role, so connections aren't interchangeable. I could think about changing that, but I'm thinking the short-term fix is to build an LRU cache of all the connections in any pool, and simply throw out the oldest ones when the cache is full and a new one is requested. I'll be happy to submit my patch when it's done. I'm sure it will lack some of the nice configurability and componentization you might want in releaseable code, but I need a fix *now*. All my sites are going down every 24 hours or so. Today it happened twice. -- Dave Abrahams BoostPro Computing http://www.boostpro.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
