[mod_python] mod_python not very smart about EGG_CACHE path

Joshua Kugler joshua at joshuakugler.com
Fri Jan 23 22:24:48 EST 2009

So, today I discovered a little quirk in mod_python.  We had been explicitly
setting the PYTHON_EGG_CACHE path during app startup, but I discovered that
if it was not defined, it would use ~/.python-eggs.  GREAT!  One less
config setting to maintain, so I took the code out.  After restarting
Apache, I discovered (via error messages) that the cache path was set
to /root/.python_eggs, even though the web server is running as 'apache'

So, from what I can tell, the first Apache instance starts up, it's running
as root, and sets PYTHON_EGG_CACHE to /root/.python-eggs.  The children
start up, inherit this setting, but are now running as apache, so can't
write to this directory.  Is there a way to get the children
to "reinitialize" this setting so they write to the correct egg cache



More information about the Mod_python mailing list