You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Community,
I am connecting python with Vertica but after some time connection is getting expired, I really want that when the connection gets expired my status gets changed In mysql we have connection.is_connected() method which is true if the connection is still maintained but if it expires it gives false , Do we have a similar function in Vertica
Thanks
The text was updated successfully, but these errors were encountered:
cur.execute("Select 1")
This statement is throwing isssue (Connection Closed by vertica)
but when I am doing
if connection.opened():
print("Yes")
It is still showing Yes
Can you tell me what's the current behavior when your connection is getting expired?
Basically i am calling a loop from where i am running a shell command and wait for 100 mins by the time my connection is getting closed by vertica
I really appreciate if you tell me how to handle this problem
This connection.opened() function generally cannot be called to determine whether a connection to a database is valid or invalid, it does passive checking. Unfortunately, there is no function to actively determine if a connection is expired.
You can determine that a connection is expired by catching exceptions that might be thrown when an operation is attempted. select 1 is a good dummy statement to execute. So you are doing the right thing.
Hello Community,
I am connecting python with Vertica but after some time connection is getting expired, I really want that when the connection gets expired my status gets changed In mysql we have connection.is_connected() method which is true if the connection is still maintained but if it expires it gives false , Do we have a similar function in Vertica
Thanks
The text was updated successfully, but these errors were encountered: