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 between_bytes_timeout to fix timing out when we get a slow request #2575
Conversation
Regression in 5.0.3
This looks like a great start, thanks for putting this PR together to follow up with this issue! In order to distinguish between 'first-byte' and 'between-byte' timeouts, not all between-byte timeouts will be set from the reactor-wakeup, there are a couple of other edge cases to consider:
One possible way of handling these cases would be to accept a second That said, given the slightly greater amount of changes needed, it might be worth splitting it into two separate PRs, one to narrowly fix the regression on |
I got a test and change for when Yeah, we can definitely split this up if you want, or do whatever other refactorings. Just let me know what direction I should go with it. |
Well, now I'm just breaking things. I'll wait for some guidance :) |
Sorry @darkhelmet, I've been busy. I or someone else will be around to help soon. |
Just commenting to bump the issue. Thanks to @darkhelmet for reporting and working on a solution. We got bit by #2574 using version 5.0.3 exactly. Will likely downgrade to 5.0.2 until this PR is sorted out and released. |
I made some tweaks to the PR in 6050b4f, which fixes up the logic on some of the edge cases so all the tests pass. It also updates @darkhelmet please take a look! If the extra commit looks good to you feel free merge the commit into your branch to update this PR. |
@darkhelmet Looks you need to rebase on top of master |
Code LGTM |
@darkhelmet Where exactly do you need further help or direction here? |
@nateberkopec I haven't had time to look at this further. With #2606 the main problem is fixed as well, so the need isn't as great. If you want to get this PR out of sight, we can close it and I can revisit it in the future if I find the time. |
Cool! Happy to help when you've got the time. 👍 |
Description
Closes #2574 by adding a
between_bytes_timeout
config option to handle slow requests instead of treatingfirst_data_timeout
as a global request timeout.Your checklist for this pull request
[changelog skip]
or[ci skip]
to the pull request title.[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.Some notes
const.rb
for this since it defaults to whatever is provided for:first_data_timeout
assert_proper_timeout
method in the server test file because I saw another assertion added to that file, there was only one, and I didn't see a rhyme or reason as to where I should add that assertion. Let me know if there's a better spot for it.