Skip to content
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

Add more fine grained timeout options: connect, recv #26

Open
sneako opened this issue Apr 20, 2020 · 4 comments
Open

Add more fine grained timeout options: connect, recv #26

sneako opened this issue Apr 20, 2020 · 4 comments

Comments

@sneako
Copy link
Owner

sneako commented Apr 20, 2020

Right now, we pass the same value for receive_timeout, everywhere that will accept it, with no regard for any time that has already elapsed. We need update the receive_timeouts we pass by subtracting the elapsed time of any intermediate steps in order to properly respect the timeout.

@sneako sneako changed the title Fix timeouts Correct timeouts Apr 20, 2020
@sneako sneako assigned sneako and unassigned sneako Apr 22, 2020
@josevalim
Copy link
Contributor

We may want to have two timeouts: one for each individual read/receive from the socket and one for the whole connect+request+response. Or even three: connect, individual read/receive, and whole request+response.

@sneako
Copy link
Owner Author

sneako commented Jun 17, 2020

We also have the pool timeout as well, so there could be a total of 4 timeouts :) It seems like a lot but I suppose most users would just keep the defaults and only configure the ones they actually care about.

@whatyouhide
Copy link
Contributor

I think having sane defaults makes up for it. I would love to be able to have this much control. :)

@sneako
Copy link
Owner Author

sneako commented Apr 24, 2023

I just merged #233 which addresses the original issue, where it was possible that the elapsed time experienced by the user could greatly exceed the configured receive_timeout.

I will leave this issue open, because I would still be willing to accept changes to make the timeouts more configurable as discussed above.

@sneako sneako changed the title Correct timeouts Add more fine grained timeout options: connect, recv Jun 13, 2023
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

No branches or pull requests

3 participants