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
Investigate 20-second-long test #2049
Labels
Comments
composerinteralia
added a commit
to composerinteralia/puma
that referenced
this issue
Nov 11, 2019
[skip changelog] Closes puma#2049 Before this commit, `test_trickle_attack` and `test_file_streamed_request` were each taking an extra 20 seconds to run. Without the `Connection: close` header, the [connection was kept alive][keep alive] until it timed out after the [`PERSISTENT_TIMEOUT`][PERSISTENT_TIMEOUT] duration of 20 seconds. [keep alive]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/server.rb#L706-L708 [PERSISTENT_TIMEOUT]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/const.rb#L109-L111
8 tasks
composerinteralia
added a commit
to composerinteralia/puma
that referenced
this issue
Nov 11, 2019
[skip changelog] Closes puma#2049 Before this commit, `test_trickle_attack` and `test_file_streamed_request` were each taking an extra 20 seconds to run. Without the `Connection: close` header, the [connection was kept alive][keep alive] until it timed out after the [`PERSISTENT_TIMEOUT`][PERSISTENT_TIMEOUT] duration of 20 seconds. [keep alive]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/server.rb#L706-L708 [PERSISTENT_TIMEOUT]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/const.rb#L109-L111
nateberkopec
pushed a commit
that referenced
this issue
Nov 11, 2019
[skip changelog] Closes #2049 Before this commit, `test_trickle_attack` and `test_file_streamed_request` were each taking an extra 20 seconds to run. Without the `Connection: close` header, the [connection was kept alive][keep alive] until it timed out after the [`PERSISTENT_TIMEOUT`][PERSISTENT_TIMEOUT] duration of 20 seconds. [keep alive]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/server.rb#L706-L708 [PERSISTENT_TIMEOUT]: https://github.com/puma/puma/blob/3835ac74dec5511d637cbc4ebc140c3b8632b447/lib/puma/const.rb#L109-L111
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As noted in a TODO,
bundle exec m test/test_web_server.rb:67
takes over 20 seconds to finish. I ran into this same issue while working on adding SSL support to the control CLI as a followup to #2046.I started to investigate this and noticed that in
Server#process_client
we end up settingclose_socket = false
, which leaves the socket open until it is closed in the reactor after the 20 second PERSISTENT_TIMEOUT.I haven't looked into why that code exists or the right way to fix this, but when running this test with
close_socket = true
instead ofclose_socket = false
it completes in under 1 second.The text was updated successfully, but these errors were encountered: