Chris Hagner
CHagner at fool.com
Fri May 18 13:45:05 EST 2001
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. 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
|