I've been trying to figure out why my visit tracking system didn't seem
to record any visits when run behind the scgi interface. I'm using the
pre-forking scgi server from the scgi module. Of course you looking at
all that information can clearly see the problem of using a threaded
visit tracking module with multiple processes, but it took me a while
to figure that out.
So, if you plan to deploy your turbogears app behind apache or lighttpd
using scgi and rely on the visit tracker or identity modules, either
use a threaded scgi server, or pick a different deployment model. I'd
currently recommend proxying, or for apache, the new and improved mpcp
module soon to be added to cherrypy proper.
Meanwhile, I'm changing my visit model to update the session table
immediately instead of caching for 30 seconds first since I'm not
actually expecting high enough traffic volumes to justify the headache.
In relation to this information, I think the documentation should be
updated to either remove scgi as a deployment option, or some prominent
warning be added.
Joseph
If the visit system depends on the Application beeing in a single
process, will it not break in mod_python too? At least on Unix where
the prefork MPM is default (and even worker creates several processes,
I think).
It sure would.