I'm trying to get the Oracle inbuilt timeout attribute to work in Python.
Some relevant docs are here: https://cx-oracle.readthedocs.io/en/latest/connection.html
import cx_Oracle
connection = cx_Oracle.connect("user/pass@thedb")
connection.callTimeout = 2000
cursor = connection.cursor()
The trouble is that the initial connection command is the one that is taking an excessive period to timeout (several minutes).
My question is, is there a way to somehow apply the callTimeout before the connection is made? or is there another way to do what I want?
I'm aware of this help: Set database connection timeout in Python It seems excessive to use threads for this.