[mod_python] preloading modules

Brian Hawthorne brianh at exelixis.com
Thu Nov 1 16:15:55 EST 2001


first i tried the PythonImport directive to preload modules setting up a
db connection pool.  but the connections were dead when i tried to use

second, i tried modifying the sitecustomize module which gets imported
from the site module at interpreter startup (supposedly).  this gave me
good connections, but it doesn't happen until the first page gets loaded.

i'd like to stuff some pretty time-consuming setup tasks into this phase
of startup... it should already be done when the first page is requested.

any ideas?

brian hawthorne

More information about the Mod_python mailing list