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
https://oracle.github.io/python-oracledb
Other
307 stars 59 forks source link

TIMEDWAIT does not result in timeout before ping probe timeout #330

Closed 7opf closed 4 days ago

7opf commented 2 months ago

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 https://github.com/oracle/python-oracledb/issues/221#issuecomment-2081298472

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.

anthony-tuininga commented 2 weeks ago

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.

7opf commented 4 days ago

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.