I was trying to update my packages in the REPL and was having the
download of the General registry fail with an error that the data rate
was too slow (less than 1 byte per 20 seconds).
Here is a session in the pkg mode of the REPL:
(jl_Axl0Ij) pkg> activate --temp
Activating new project atC:\Users\XX\AppData\Local\Temp\1\jl_h92qjY
(jl_h92qjY) pkg> registry up General
Updating registry atC:\Software\dot_julia\registries\General.toml
┌ Error: Some registries failed to update:
│ — C:\Software\dot_julia\registries\General.toml — failed to download from https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/1eb18d8d6cf6d1e3068e400c7f57345f3e8ca46a. Exception: RequestError: HTTP/1.1 302 Moved Temporarily (Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds) while requesting https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/1eb18d8d6cf6d1e3068e400c7f57345f3e8ca46a
└ @ Pkg.Registry C:\Software\julia\julia-1.10.9\share\julia\stdlib\v1.10\Pkg\src\Registry\Registry.jl:528
I was able to find the following in the discourse forum that indicate that the origin
of the failure is happening in LibCURL
called from Downloads
:
and
Following the answer in the last post, I ran the following code in the REPL before
switching to pkg mode (the code has been updated and tested with julia 1.10.9:
using Downloads, Downloads.Curl
Downloads.EASY_HOOK[] = (easy, info) -> begin
# Disable LibCURL's low speed timeout
Curl.setopt(easy, Curl.CURLOPT_LOW_SPEED_TIME, 0)
end
I hope this is helpful to someone. -chm