-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oracledb.connect_async hangs forever #320
Comments
One possibility: the database you are connecting to has NNE enabled. Can you check with the queries mentioned in this link? It is possible that the code for asyncio isn't addressing that correctly. |
Thanks for the quick response! NNE is not enabled. |
Can you set PYO_DEBUG_PACKETS and provide some traces to @anthony-tuininga ? See https://python-oracledb.readthedocs.io/en/latest/user_guide/tracing.html#low-level-python-oracledb-driver-tracing and various other references in Issues and Discussions. |
The gist linked in my first comment already contains a log excerpt with PYO_DEBUG_PACKETS enabled. Do you require any further debugging information? Please note that the stack trace at the end of the log is caused by canceling the task externally in an attempt to work around the issue. |
A few more questions, the answers to which may be helpful:
|
Some general context first: We only experience this problem in our staging and production environment, but neither in our identical test environment, nor in our development environments. The affected software component is part of a project in a highly regulated industry. We only act as the software provider for the project, and the infrastructure, including the database server, is managed by a third party. We only have very limited access to the staging and prod environments, and every change we want to deploy there requires a very long lead time, which makes low level debugging nearly impossible.
We originally used the non async connection variant before switching to async, and expirienced no problems with it. We cant easily verify that this would still work today tho.
The failure occurs consistently in the two affected environments, even with different users/schemas
We have about 40 services written in java which can connect normally
select BANNER_FULL from v$version The database is an active/standby dataguard cluster. Our python application tries to connect to each of the two nodes separately, to determine their status. We get an (expected) ORA-12514 error from the inactive one, and experience the hang problem on the active one.
No, because of our situation described above, I don't think we will get access to them.
We can't easily perform packet captures in these environments.
No |
Hmm, that sounds like debugging this issue could be a nightmare! Based on the traces you gave earlier it seems like the server has either given up or has sent a partial packet for some reason. If you can't perform a packet capture you could add a print() statement to the |
python-oracledb 2.1.1
python 3.9.16
hang
Calling oracledb.connect_async hangs forever. We only experience this issue in two of three (identical) environments, the third one works normally. Other software components can connect to the database in the affected environment normally.
Please see the following log: https://gist.github.com/kisv-SOPTIM/18d91a699f6050dbadfd6da50bc12407
no
Any hint regarding a possible cause is highly appreciated.
The text was updated successfully, but these errors were encountered: