Skip to content

Commit

Permalink
config: Raise the default requests limit to 5min
Browse files Browse the repository at this point in the history
45s is fairly low on slower connections and larger files. Having
timeout defaulting to such a low default value has no real benefit to
defaulting to a more reasonable larger number which has more practical
benefits:
- on fast connections it doesn't make any difference
- better resilience with slower connections than the current timeout
- much smaller probability users will need to tweak it
- in sync with some other library's default we use [1]

[1] https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession

Signed-off-by: Erik Skultety <[email protected]>
  • Loading branch information
eskultety committed Jul 15, 2024
1 parent 4f17bef commit 8d77085
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cachi2/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ class Config(BaseModel, extra="forbid"):
gomod_download_max_tries: int = 5
gomod_strict_vendor: bool = True
subprocess_timeout: int = 3600
requests_timeout: int = 45

# matches aiohttp default timeout:
# https://docs.aiohttp.org/en/v3.9.5/client_reference.html#aiohttp.ClientSession
requests_timeout: int = 300
concurrency_limit: int = 5


Expand Down

0 comments on commit 8d77085

Please sign in to comment.