2013/3/21 David Stanek <dstanek@dstanek.com>
We are seeing a strange issue where DRCP connections are not being returned to the pool even after the connection is closed. My sample code (http://pastebin.com/UB5cPtsZ) shows a really simple example where I create more processes than I have connections in the pool. I expected the connection to be available for reuse by the time the child process sleeps. Then I would expect to see a stream of output and the processes would all exit in about 10 seconds.

What I'm actually seeing is every process making a connection, but the queries for processes above the number of connections in the pool block until some of the processes die. So every 10 seconds or so a few more queries run.

Does the process really need to die for the connection to be released?

It has been a while, but I remember that at some point con.close() would call OCISessionEnd but not OCIServerDetach.
Only the object destructor would call OCIServerDetach.
You could try a "del con" just before the sleep.

Looking at the HISTORY, this was fixed in version 5.1.1.
Are you using an older version?

Amaury Forgeot d'Arc