I just installed trac 0.10.4 on a Centos 5 machine (an upgrade and
move from a 10.3 on a RHEL3 machine) using apache 2.2. I decided to
switch to mod_python in place of the CGI. However, with mod_python the
httpd processes seem to be running for a long, long time, so much so
that the host becomes bogged down and pretty much stops working - the
load factor will reach 15-20 before I stop apache. When I switch back
to the CGI the problem goes away. I'd really like to understand what's
up with mod_python. Any ideas?
Here's my <Location> directive for trac for use with mod_python:
<Location /trac>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /usr/local/scm/trac
PythonOption TracUriRoot /trac
# PythonPath "sys.path + ['/usr/share/trac']"
SetEnv PYTHON_EGG_CACHE "/var/cache/www/pythoneggs"
</Location>
I commented out PythonPath in an effort to fix this...
Other version information:
Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
mod_python-3.2.8-3.1
httpd-2.2.3-11.el5_1.centos.3
clearsilver-0.10.5
I have the trac webadmin 0.1.2 egg for python 2.4
Thanks,
James
--
James Gallagher
jgallagher at opendap.org
406.723.8663
>
> The whole point of Apache/mod_python is that processes persist and a
> new one isn't created for each request as is the case with CGI.
>
> It is though generally a good idea with mod_python/Trac to force
> Apache to recycle processes every so often. See the
> MaxRequestsPerChild directive in Apache and read the Trac
> documentation which I am sure you would probably mention using this
> directive. Set it to 1000 and see how it goes.
Thanks, I'll give that a try. I think the problem was exacerbated by
robots hitting the new machines all at once. I'll try the
MaxRequestsPerChild and see where that gets me.
James