-
Notifications
You must be signed in to change notification settings - Fork 162
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
Catch error for incorrect credentials in Python #710
Comments
it would be great if there were at least an option in 'read_sql' for something like |
Hey @guilhermedelyra, this is not something we can control for sources using the r2d2 rust package (including r2d2_oracle) for connection pooling. In the r2d2 source code, there is an exponential backoff logic adopted for the retry strategy and connection attempts are separated by a delay which doubles after each unsuccessful retry. This is capped at 30 seconds, which is defined in their config. As such, any form of connection failure (be it due to driver, authentication or something related) will result in this logic being triggered. You would be better off suggesting an alternative strategy to handle retries on their GitHub Issues. |
thanks for responding so quickly! |
What language are you using?
Python
What version are you using?
0.3.3
What database are you using?
MySql (same applies for all databases)
What dataframe are you using?
N/A
Can you describe your bug?
I want to be able to test if the credentials i'm using is valid. The problem is:
When i pass an incorrect connection_string (with invalid credentials), i'm stuck for ~30s looking at connector-x retrying it multiple times before i can actually deal with the error.
Even if i hit 'CTRL+C' multiple times, i have to wait those 30s before i can exit the program.
What are the steps to reproduce the behavior?
As you can see in the output, the
e
Exception is only printed after all those error logs appears (~25s)The text was updated successfully, but these errors were encountered: