[mod_python] mod_python executing old versions of my code

James Paige jamesp at westcoastaerospace.com
Wed Jan 25 16:10:16 EST 2006

Daniel Nogradi wrote:
>> I'm new to mod_python... so maybe I have missed something fundamental
>> here, but mod_python seems to be keeping several copies of my old code
>> in memory, so when I make changes and reload the page, sometimes I get
>> my changes, and sometimes I get a seemingly-random version of the code
>> that I have already changed.
> You can also try setting the MaxRequestsPerChild apache directive to 1, it
> worked for me very well. Initially I had the same problem like you, but with
> MaxRequestsPerChild 1
> in the apache config file the problem is gone because every child that loads
> your code dies after the request, so it doesn't stay anywhere.

That sounds like it would be an excellent workaround if I was using a
dedicated server that ran nothing but mod_python, but for a shared
server-- especially one on which I might not necessarily have root
access at all, that will not work.

James Paige

More information about the Mod_python mailing list