Skip to content

TinyTex download timeout limit #286

Description

@matthewgson

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

  • [v] I have fully read the issue guide at https://yihui.org/issue/.
  • [v] I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included 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').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [v] I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Activity

  1. cderv commented on Mar 9, 2021

    @cderv
    Contributor

    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.

  2. yihui commented on Mar 9, 2021

    @yihui
    Collaborator

    @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!

  3. cderv commented on Mar 9, 2021

    @cderv
    Contributor

    So quick ! I was also looking at adding it in xfun to increase the option. 😅 👍

  4. added a commit that references this issue on Mar 16, 2021
    6b54ec8
  5. added a commit that references this issue on May 21, 2024
    c2eb6ff
  6. added a commit that references this issue on May 11, 2026
  7. added a commit that references this issue on May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions