[mod_python] Singleton Object

Tom Wells drshade at gmail.com
Thu Dec 13 03:57:12 EST 2007

On Dec 13, 2007 10:13 AM, Graham Dumpleton <graham.dumpleton at gmail.com>

> If you expect state to be available in each Apache child process when
> run on UNIX, you cant avoid having multiple distinct connections back
> to the back end system to collect the data. Playing with the C API
> post config hook isn't going to help you.
> If a connection from each Apache child process is okay, then use
> PythonImport directive to import a module on process startup which
> does any once of initialisation.

Hi Graham - thanks for the quick reply!

Your response is what I expected (sharing of data between child processes),
just wanted to confirm the my understanding with the experts. Thanks, the
PythonImport is actually exactly what I need for the watchdog thread.

However, it should be possible to share state between apache child processes
by using something like memcached right?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20071213/2272bdd0/attachment.html

More information about the Mod_python mailing list