Apache/mod_python & MySQLdb

S

scott

AIUI, global variables are supposed to be preserved within each Apache
thread/prcoess.

However, I'm importing and using MySQLdb within a class in a separate
module, which is in turn imported and used within a _function (ie. not
"published"). So, AFAICT, it's not supposed to be preseved.

But unless I specifically close() the database connection, it gets
stranded and I eventually run out of connections, even if I del the
connection and cursor objects.

What gives? What happened to GC?


Also, is there an easy way to run pychecker on mod_python scripts? It
fails since _apache doesn't exist outside of Apache....

regards,
Confused & tired of PHP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top