On Sep 14, 12:29 am, bduke <[EMAIL PROTECTED]> wrote:
> I have tried to setup 2 separate Trac DBs on the same machine with
> different paths, both using WSGI because it is so blazingly fast.
> However, if I try to access both DBs, Apache crashes. One DB will work
> fine by itself, but as soon as I access the other, I get a crash. I am
> running Apache 2.0.59 on Windows 2003 Server. If I let one of the DBs
> be accessed through the cgi scipt and one through wsgi, everything
> works fine, but the cgi DB is really slow.
>
> I was using something like this in the Apache config. Do I need to do
> something special to have multiple Trac DBs?
>
> Thanks,
> Brian
>
> WSGIScriptAlias /first C:\first\trac.db\apache\trac.wsgi
>
> <Directory C:\first\trac.db\apache>
>     SetEnv trac.env_path C:\first\trac.db
>     Order deny,allow
>     Allow from all
> </Directory>
>
> <Location "/first">
>   AuthType Basic
>   AuthName "Project"
>   AuthUserFile C:/first/.htaccess
>   Require valid-user
>   SetEnv trac.env_path C:\first\trac.db
> </Location>
>
> WSGIScriptAlias /second C:\second\trac.db\apache\trac.wsgi
>
> <Directory C:\second\trac.db\apache>
>     SetEnv trac.env_path C:\second\trac.db
>     Order deny,allow
>     Allow from all
> </Directory>
>
> <Location "/second">
>   AuthType Basic
>   AuthName "Project"
>   AuthUserFile C:/second/.htaccess
>   Require valid-user
>   SetEnv trac.env_path C:\second\trac.db
> </Location>

Because of potential issues with running Trac (due to subversion
bindings) in secondary Python sub interpreters you should force both
Trac instances to run in the first interpreter that Python creates. In
mod_wsgi this can be done by setting:

  WSGIApplicationGroup %{GLOBAL}

That both Trac instances are running together in the same Python
interpreter instance is supposedly not an issue as Trac is designed to
cope with that. Part of the trick of why Trac doesn't get mixed up is
that trac.env_path is set dynamically based on which Trac instance you
are actually accessing and so it knows which database etc to use.

Also, you shouldn't need:

  SetEnv trac.env_path C:\first\trac.db

within the Location directive. It is enough to have it listed in the
Directory directives.

For further details on setting up Trac with mod_wsgi see:

  http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac

Graham


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to