171 | | However, this problem can also occur using mod_wsgi in non-daemon mode. Running mod_wsgi in daemon mode, with one daemon group for each trac instance seems to fix the problem. |
172 | | |
173 | | Example for setting up daemon process groups in httpd.conf: (see also: [http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide QuickConfigurationGuide at googleCode] |
174 | | |
175 | | {{{ |
176 | | WSGIDaemonProcess projectone user=wwwrun group=root threads=15 python-eggs=/trac/projectOne/egg-cache |
177 | | WSGIScriptAlias /projects/projectOne /trac/projectOne/trac.wsgi |
178 | | |
179 | | <Directory /trac/projectOne/> |
180 | | WSGIProcessGroup projectone |
181 | | </Directory> |
182 | | |
183 | | |
184 | | WSGIDaemonProcess projecttwo user=wwwrun group=root threads=15 python-eggs=/trac/projectTwo/egg-cache |
185 | | WSGIScriptAlias /projects/projectTwo /trac/projectTwo/trac.wsgi |
186 | | |
187 | | <Directory /trac/projectTwo/> |
188 | | WSGIProcessGroup projecttwo |
189 | | </Directory> |
190 | | |
191 | | }}} |
192 | | |
193 | | |
| 171 | This problem can also occur when using mod_wsgi for both embedded mode or daemon mode. As documented in [http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac integrating Trac with mod_wsgi], the solution is the same as for mod_python. That is, force Trac insatnce to run in main Python interpreter instance. When using mod_wsgi this is done using: |
| 172 | {{{ |
| 173 | WSGIApplicationGroup %{GLOBAL} |
| 174 | }}} |