Open gix opened 1 year ago
Brother, write your own thread pool. The performance of the built-in thread pool feels too low or always error-prone. I have given up using it. Write your own thread pool.
Hi,
The code hangs in the 3rd iteration as by default, if the pool is exhausted, requesting a new connection blocks until one is available. This is expected behavior. You can change that behavior by using OCI_PoolSetNoWait().
Regards,
Vincent
The code hangs in the 3rd iteration as by default, if the pool is exhausted, requesting a new connection blocks until one is available.
That's not the issue I was describing. The problem is that ~Connection
does not release the connection back to the pool. Sample code using a connection also seems to rely on the destructor. Is it required to manually close the connection? If so, the documentation of Close
should be clarified and state that a pooled connection is returned and not really closed.
Indeed, I missed that point.
I will investigate.
Regards,
Vincent.
Hi,
This is a bug introduced by commit 8ad2fa43c8b9f5089fa3b26aa96f16b0f2eb20e5 in v4.7.5. It is now fixed in v4.7.7 dev branch.
Regards,
Vincent
The following code hangs in
OCISessionGet
in the third iteration:The connections are never released to the pool. As far as I can tell, the
Connection
object is created as transient, and so theHandleDeleter
is never called. But maybe I'm doing something wrong.