-
Notifications
You must be signed in to change notification settings - Fork 179
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
How to check if database connection is expired in python #301
Comments
@I-akshay Yes, vertica-python has similar functions: Can you tell me what's the current behavior when your connection is getting expired? |
HI @sitingren For example : conn_info = {'host': '10.63.4.301', 'port': 5433, 'database': 'personaldwh','user': 'username', 'password': 'username123'} Now lets says i wait for 45 mins now, cur.execute("Select 1") It is still showing Yes Can you tell me what's the current behavior when your connection is getting expired? I really appreciate if you tell me how to handle this problem |
This You can determine that a connection is expired by catching exceptions that might be thrown when an operation is attempted. |
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: