[mod_python] permanent db connection (more than in FAQ 3.3)

sandor.kopanyi at mailbox.hu sandor.kopanyi at mailbox.hu
Fri Nov 15 16:27:21 EST 2002


Hi,

In the mod_python FAQ 3.3 there is a good example of a 'permanent'
database
connection. This works fine, the connection is reused, as long as the
request
is handled in the same child process (apache child process). But a new
child
process gets a new interpreter => new connection is created. At least
that's
what I guess.

I've tried the Python*Interp* directives, but the connection is
re-created
regardless of those directives. Am I doing something wrong?

E.g. when setting PythonInterpeter to something (e.g. blabla), the
connection
is recreated again and again.

Any ideeas?

I'm using apache 1.3.23 with mod_python 2.7.6 on RedHat 7.3; the
application
is based on the publisher handler; the db connection code is almost
copy-paste from
the FAQ.

Best regards,
Sandor


________________________________________________
http://mailbox.hu - Már SMS értesítéssel is!





More information about the Mod_python mailing list