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

CHIA-590: Add in connect timeout to DL http download #18339

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

emlowe
Copy link
Contributor

@emlowe emlowe commented Jul 18, 2024

Some adjustments to timeouts when datalayer is downloading files over HTTP.

The default total timeout is increased to 45s - this could probably be increased further since generally you really want to get the file fully downloaded
A new "socket connect" timeout is added and set to 5s. This means that the socket much connect within 5s - this helps with servers that are blackholing requests behind a firewall (incorrectly configured or down)

I am not sure how to test the socket connect timeout in CI since I doubt it's easy to force a connect timeout (note if the server isn't listening you will get an error immediately)

@emlowe emlowe requested a review from a team as a code owner July 18, 2024 21:18
@emlowe emlowe marked this pull request as draft July 18, 2024 21:18
@emlowe emlowe added the Added Required label for PR that categorizes merge commit message as "Added" for changelog label Jul 18, 2024
@emlowe emlowe requested review from altendky and fchirica July 19, 2024 20:13
@emlowe emlowe marked this pull request as ready for review July 19, 2024 20:14
chia/data_layer/download_data.py Outdated Show resolved Hide resolved
chia/_tests/core/data_layer/test_data_store.py Outdated Show resolved Hide resolved
chia/data_layer/data_layer.py Outdated Show resolved Hide resolved
altendky
altendky previously approved these changes Jul 23, 2024
Copy link
Contributor

@wjblanke wjblanke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is ok but for existing installs the config will keep things at 15

@Starttoaster Starttoaster merged commit 65e888f into main Jul 24, 2024
375 checks passed
@Starttoaster Starttoaster deleted the EL.DL-connection-timeout branch July 24, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added Required label for PR that categorizes merge commit message as "Added" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants