[SQLObject] connections, threads, processes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ben <be...@me...> - 2004-03-13 05:53:59
|
sorry in advance i'm a sqlobject newbie. i'm using sqlobject 0.5.2 in mod_python + apache / freebsd with psycopg + postgres. as it is a long living server with a lot of processes, i need to keep the connection count down to avoid running out of connections. since i'm on freebsd and apache threads don't work there, i'm using the prefork model, so each child process is single-threaded. now, correct me if i'm wrong, but AFAICT this means that i should never need more than one connect per child. however i log os.getpid + DBConnection._connectionCount and i see the number growing inside the processes. this is troubling. i know SQLObject is doing connection pooling, but since it's single threaded, why is this pool growing? in fact psycopg CURSORS can be shared between threads, so we shouldn't even need more than one of those, right? help! thanks, Ben Lee |