Edgewall Software

Changes between Version 8 and Version 9 of TracModWSGI


Ignore:
Timestamp:
Feb 17, 2008, 1:25:03 AM (16 years ago)
Author:
anonymous
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracModWSGI

    v8 v9  
    3737
    3838For troubleshooting tips, see the [TracModPython#Troubleshooting mod_python troubleshooting] section, as most Apache-related issues are quite similar.
     39
     40== Trac with PostgreSQL ==
     41
     42When using the mod_wsgi adapter with multiple Trac instances and PostgreSQL (or MySQL?) as a database back-end the server can get a lot of open database connections. (and thus PostgreSQL processes)
     43
     44A workable solution is to disabled connection pooling in Trac. This is done by setting poolable = False in trac.db.postgres_backend on the PostgreSQLConnection class.
     45
     46But it's not necessary to edit the source of trac, the following lines in trac.wsgi will also work:
     47
     48{{{
     49import trac.db.postgres_backend
     50trac.db.postgres_backend.PostgreSQLConnection.poolable = False
     51}}}
     52
     53Now Trac drops the connection after serving a page and the connection count on the database will be kept minimal.