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

Replace IO.select with IO#wait_* when checking a single IO #2666

Merged
merged 2 commits into from Jul 25, 2021

Conversation

MSP-Greg
Copy link
Member

Description

Replace IO.select with IO#wait_readable/IO#wait_writable when checking a single IO.

This changed an intermittent macOS issue into something stable, which was an Errno::EPIPE error being raised when a client writes to a UNIXSocket, and the server is closing. Fixed in test file.

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop.

@MSP-Greg
Copy link
Member Author

TestIntegrationPumactl#test_phased_restart_cluster failed in one job (Ubuntu 18.03, Ruby 2.7), it has an assert for total time taken to restart and also stop. Darwin value is 8, Ubuntu is 5. It took about 5.5. It is Friday afternoon in the US, and CI is often busy.

Maybe the time should be increased to 6?

@dentarg
Copy link
Member

dentarg commented Jul 17, 2021

Maybe the time should be increased to 6?

Sure... do we need this to take a certain amount of time? I guess we want to catch it taking unreasonable amount of time. Maybe make it 10 seconds (or more?) for all?

@nateberkopec nateberkopec merged commit 6e4257f into puma:master Jul 25, 2021
@MSP-Greg MSP-Greg deleted the io-wait branch July 26, 2021 13:19
@ioquatix
Copy link
Contributor

ioquatix commented Sep 2, 2021

Nice work.

JuanitoFatas pushed a commit to JuanitoFatas/puma that referenced this pull request Sep 9, 2022
* Replace IO.select with IO#wait_* when checking a single IO

* helpers/integration.rb - fix Darwin UNIXSocket errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants