Skip to content

[Python driver] adding connect_timeout#937

Closed
Mghrabi wants to merge 1 commit intoapache:masterfrom
Mghrabi:add-timeout
Closed

[Python driver] adding connect_timeout#937
Mghrabi wants to merge 1 commit intoapache:masterfrom
Mghrabi:add-timeout

Conversation

@Mghrabi
Copy link

@Mghrabi Mghrabi commented May 19, 2023

  • Added connect_timeout to files in samples and to test_age_py.py to quit long-time failed connections
  • Modified the connection instructions based on the changes

Reason for making the PR:
I went through an issue while trying to connect to a database and it failed for some reason (using a jupyter notebook), the cell that runs the connection request was running forever and without yielding any output as the connect_timeout is not set. By adding the connect_timeout long-time failed connections quit

Note: (FROM MY UNDERSTANDING) I think adding timeout is a good practice, especially for local connections which shouldn't take a long time to connect, that's why I made this PR anyway since it targets samples and test files.

Copy link
Member

@dehowef dehowef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I think it might be better to let the users kill the program if it hangs rather than have it terminate early on them. Thank you for your contribution though.

@dehowef dehowef closed this Jun 16, 2023
@Mghrabi Mghrabi deleted the add-timeout branch June 16, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants