[mod_python] several mod_python issues

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sat May 19 00:38:41 EST 2001

On Fri, 18 May 2001, Chris Hagner wrote:

> While working with mod_python lately, we've noticed a couple of
> inconsistencies with the documentation and also have a few
> comments/questions on intended behavior and whether certain behavior
> was intended or is just a bug.
> 1. The PythonNoReload directive is a bit confusing and does not provide
>    an option that would also be useful. "PythonNoReload Off" performs a
>    full reload/import of the pyhandler on every request.
>    "PythonNoReload On" only performs a reload/import when the mtime
>    of the handler has changed. We would like to also propose an
>    additional option to "never" reload/import the handler except upon
>    initial startup of the child process. This would allow for a more
>    controlled re-initialization of the server(s) via an apache graceful
>    restart.

This one is a BUG that seems to have been introduced in 2.7.3 releases
while trying to fix another one....

The remaining two issues are just a big mess because I never gave any
priority to PythonImport. The only catch with Summer Hayes's approach is
that stuff will run as root, which to me seems kind of bad. (I haven't
seen the patch, so this is part speculation)


> 2. Modules pre-loaded via the PythonImport directive do not appear to be
>    readily available in the handler. We've verified that Python Import
>    and the handler are running in the same interpreter space by passing
>    info via global classes such as Exception, but we can't find the
>    modules loaded via PythonImport. They must be somewhere, but just
>    can't seem to locate them... What is the expected way to access
>    modules that have been pre-loaded via PythonImport from within code
>    such as the handler?
> 3. As detailed in an earlier post from Sumner Hayes, mod_python does not
>    perform as expected/desired on a apache graceful restart.
>    Essentially, new children are spawned and declared ready to the
>    parent before they can actually serve requests (ie still initilizing
>    any PythonImport directives). The mod_python directives should be
>    fully processed before considering the child ready to serve requests.
> This isn't meant as just a rant. Just some things that we've noticed
> that are important in our environment. We're willing to help with fixes,
> etc., but wanted to make sure we had a full perspective on all the
> issues at hand before attacking this stuff.
> Please let us know what you think about the observations listed above.
> Thanks.
> --
> Stephan Koledin
> Mad Scientist
> The Motley Fool
> http://fool.com
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list