helper: Bound internet checks so a DNS hang is not INTERNET_CHECK_FAIL - #4178
Merged
patrickelectric merged 4 commits intoAug 25, 2026
Conversation
joaoantoniocardoso
marked this pull request as ready for review
August 18, 2026 20:50
This comment was marked as resolved.
This comment was marked as resolved.
joaoantoniocardoso
marked this pull request as draft
August 18, 2026 20:54
joaoantoniocardoso
force-pushed
the
fix/helper-internet-check-timeout
branch
from
August 18, 2026 21:08
caebd3d to
e4e69b9
Compare
joaoantoniocardoso
marked this pull request as ready for review
August 18, 2026 23:44
joaoantoniocardoso
marked this pull request as draft
August 19, 2026 00:18
joaoantoniocardoso
marked this pull request as ready for review
August 19, 2026 00:40
joaoantoniocardoso
force-pushed
the
fix/helper-internet-check-timeout
branch
from
August 19, 2026 00:49
b2d40cd to
1b61a18
Compare
nicoschmdt
approved these changes
Aug 25, 2026
patrickelectric
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Helper's internet check waited for every website probe, including DNS lookups that ignore the 5s socket timeout. A lost UDP query to
8.8.8.8costs glibc ~10s, which matches the frontend's 10s Axios deadline, so the UI showedINTERNET_CHECK_FAILwhile ICMP still worked.check_internet_accessnow returns within 4s. Sites still resolving areonline: false, error: "timeout"— not a failed network. In-flight probes are reused so a hung DNS lookup cannot queue a second worker.temporary_cachecalls coalesce per args.web_servicespolling is 10s so scans no longer stack every 5s.Fixes #4176
Test plan
GET /helper/latest/check_internet_accessreturns in well under 10s (Pi retest: 200 in ~19ms, all five sites online; cached/concurrent polls 12–25ms)has_internetor raiseINTERNET_CHECK_FAIL