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

Use resolv-replace #80

Closed
wants to merge 1 commit into from
Closed

Use resolv-replace #80

wants to merge 1 commit into from

Conversation

lune-sta
Copy link

The current implementation uses a C-language level implementation for DNS resolution.
Because timeout is implemented with ruby thread, the DNS timeout cannot be interrupted.
So it takes more time than the timeout in cases where DNS cannot resolve.

In this PR, replacing the DNS resolver with an implementation of ruby allows for the correct timeout.

These are described in the Japanese reference manual.
https://docs.ruby-lang.org/ja/latest/class/Timeout.html

The timeout interrupt is provided by Thread. Implemented at the C language level, timeout is powerless for processing that Ruby threads cannot interrupt.
There aren't many of these at a practical level, but things like Socket won't cut in if DNS resolution takes too long (You must use resolv-replace).
You need to reimplement it in Ruby or be aware of Ruby threads on the C side.

@zaru
Copy link
Owner

zaru commented Jul 19, 2019

@lune-sta Thanks for PR.
Have you ever had trouble if you didn't actually use resolv-replace ?

@lune-sta
Copy link
Author

@zaru

Thank you for your reply.
I use webpush with software called mastodon.
Recently, a problem with the server receiving a push caused it to accumulate 1000 push jobs and delay processing.

The problem is fixed now and I cannot reproduce it, so I will close the PR once.
If the problem reappears, I will share the data when using resolv-replace.

@lune-sta lune-sta closed this Jul 19, 2019
@zaru
Copy link
Owner

zaru commented Jul 21, 2019

@lune-sta Thank you for the report. It will be helpful.
If the problem recurs, please feel free to PR.

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