I have some code that is connecting to an Oracle DB via the cx_Oracle python module. When I run the query it finishes successfully, however I see the message "subsciber -54320 create failed" written to the screen when the interpreter shuts down. The specific number that is shown is not always the same, but is often consistent between consecutive runs of the code. When this occurs, I observe that it takes a long time to perform the query, about 10 seconds.
Interestingly, every so often I do not see this message, and when this happens the query is very fast, about 1 second or less. I also observe that if I ctrl+c during execution when this happens it causes the process to hang for about an hour and no longer respond to interrupt signals.
I have found that this behavior is independent of the query contents or what table/schema I am querying.
The only thing I could find when searching for solutions was this Oracle support page, but it only describes the problem and does not give a solution.
I am not an administrator, just a user, so hopefully there is a client-side solution.
Minimum working example
import cx_Oracle
with cx_Oracle.connect("user", "password", "dns") as db:
try:
cursor = db.cursor()
for row in cursor.execute("SELECT * FROM MYSCHEMA.MYTABLE"):
print(row)
finally:
cursor.close()