oracle / python-oracledb

Python driver for Oracle Database conforming to the Python DB API 2.0 specification. This is the renamed, new major release of cx_Oracle

Home Page:https://oracle.github.io/python-oracledb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TIMEDWAIT does not result in timeout before ping probe timeout

7opf opened this issue · comments

Yes, this patch will be included in the upcoming release of 2.2. I plan to close this issue after that release has been completed. Thanks for your help in verifying the fix!

Regarding the second issue, the "hang" should not be indefinite as the underlying network will eventually give up and raise an exception. That could, however, be a rather long time! A separate enhancement is needed here -- the addition of pool_ping_timeout with a reasonable default. If you wish to create a separate issue for this additional feature, please go ahead and do so. That will be addressed in the next release.

Originally posted by @anthony-tuininga in #221 (comment)

I would consider this a bug rather than an enhancement, based on this description: https://python-oracledb.readthedocs.io/en/latest/api_manual/module.html#oracledb.POOL_GETMODE_TIMEDWAIT

A caller expects to receive the timeout at wait_timeout, but currently, due to a separate ping timeout, this could be much longer.

I have pushed a patch that corrects this issue. If you are able to build from source you can verify that it works for you, too.

Thank you. I did not test this, but the commit looks sound. Once 2.3.x is available, I will try using thin/asyncio again and verify.