Hi, I'm wondering if the timeout limit was necessary when downloading TinyTex from R session. In my sample, it fails 2 times and take 83 seconds in third time to download the package. Could you consider increasing default timeout limit (say, 3 minutes?), or change its behavior to start right from the third approach?
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
Content type 'application/octet-stream' length 68518405 bytes (65.3 MB)
==============================================
downloaded 60.5 MB
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
Content type 'application/octet-stream' length 68518405 bytes (65.3 MB)
===============
downloaded 20.4 MB
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 117 0 117 0 0 304 0 --:--:-- --:--:-- --:--:-- 304
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 65.3M 100 65.3M 0 0 801k 0 0:01:23 0:01:23 --:--:-- 944k
Warning messages:
1: In download.file(url, output, ..., method = method) :
downloaded length 63422464 != reported length 68518405
2: In download.file(url, output, ..., method = method) :
URL 'https://appveyorcidatav2.blob.core.windows.net/yihui-27038/tinytex/1-0-1447/nalg642ybsit7moh/TinyTeX-1.tgz?sv=2015-12-11&sr=c&sig=vA6JhS%2Bx3cv9YssXgpz0HRYx6l2avhU9BFx9vtQQok4%3D&st=2021-03-09T14%3A45%3A17Z&se=2021-03-09T14%3A51%3A17Z&sp=r': Timeout of 60 seconds was reached
3: In download.file(url, output, ..., method = method) :
downloaded length 21397504 != reported length 68518405
4: In download.file(url, output, ..., method = method) :
URL 'https://appveyorcidatav2.blob.core.windows.net/yihui-27038/tinytex/1-0-1447/nalg642ybsit7moh/TinyTeX-1.tgz?sv=2015-12-11&sr=c&sig=JWP%2By8dj3RZWIcRdXkQkMvwYeB%2FaAsXA5aKC%2F2o0a6g%3D&st=2021-03-09T14%3A46%3A17Z&se=2021-03-09T14%3A52%3A17Z&sp=r': Timeout of 60 seconds was reached
SessionInfo
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.2.3
By filing an issue to this repo, I promise that
xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/tinytex').I understand that my issue may be closed if I don't fulfill my promises.
What is the command you run in the first place ? install_tinytex() ?
If so I think the different tries are different download methods but I am not sure we set a timeout. Know that download.file() has one by default of 60 seconds. See ?download.file()
The timeout for many parts of the transfer can be set by the option timeout which defaults to 60 seconds. This is often insufficient for downloads of large files (50MB or more) and so should be increased when download.file is used in packages to do so. Note that the user can set the default timeout by the environment variable R_DEFAULT_INTERNET_TIMEOUT in recent versions of R, so to ensure that this is not decreased packages should use something like
options(timeout = max(300, getOption("timeout")))
You could try that on your R session.
@matthewgson I just increased the default timeout value to 3600 seconds in xfun::download_file(). You can either install the development version of xfun:
remotes::install_github('yihui/xfun')
or set options(timeout) as suggested by @cderv above. Thanks!
So quick ! I was also looking at adding it in xfun to increase the option. 馃槄 馃憤
Most helpful comment
@matthewgson I just increased the default
timeoutvalue to 3600 seconds inxfun::download_file(). You can either install the development version of xfun:or set
options(timeout)as suggested by @cderv above. Thanks!