[mod_python] session example

Colin Fox cfox at cfconsulting.ca
Tue Apr 6 23:35:36 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gregory (Grisha) Trubetskoy wrote:
|
| On Tue, 6 Apr 2004, Colin Fox wrote:
|
|
|>Incidentally, I've got MaxRequestsPerChild set to 1, so that when I
|>change my files apache will actually reload them rather than cache them.
|>
|>Is that a possible issue?
|
|
| It could be, because Apache will terminate a child whose life is over,
| but it's impossible to tell without knowing the details of your program.
|
| One thing you may try as an experiment is to disable session locking
| (Session(lock=0)). It will still use locking for access to the DBM, but it
| won't lock individual sessions.
|
| Grisha

Thanks! I did that, and it seems that solved my locking issue. Now my
site is nice and snappy everywhere.

The question now is - what are the implications of turning off the lock?

On a related note - I'd like to create my own Session subclass,
DBSession, which would record session info into a postgres database. I'd
like to do this so that I could set up a server farm, and share the
session data across multiple machines.

Is this realistic, or are there other issues that I would stumble over?

cf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAc6E4oaQ1/feGlJoRAoRXAJ9nwOAlrsaCk6ZaIXho+4OKCEmKiQCfe9Fu
gPwU81J/YvhBp0R9NGavVRs=
=755G
-----END PGP SIGNATURE-----


More information about the Mod_python mailing list