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

Increase timeout duration on R package jar download #7505

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 3 comments
Closed

Increase timeout duration on R package jar download #7505

exalate-issue-sync bot opened this issue May 11, 2023 · 3 comments
Assignees

Comments

@exalate-issue-sync
Copy link

Feedback from CRAN (they are saying we need to increase the timeout duration again; this has been noted once [before|https://h2oai.atlassian.net/browse/PUBDEV-7779]):

{quote}Please see the problems shown on
<[https://cran.r-project.org/web/checks/check_results_h2o.html|https://cran.r-project.org/web/checks/check_results_h2o.html]>.

Please correct before 2021-05-24 to safely retain your package on CRAN.

I am pretty sure you have previously been told about timeouts: see ?download.file.

When I tried the download manually not long after that failure it took 6m, so a timeout of at least 1000 would be appropriate – AWS download speeds are very variable. And make sure you do not decrease from R_DEFAULT_INTERNET_TIMEOUT if set.

Also, the message

Performing one-time download of h2o.jar from
[https://s3.amazonaws.com/h2o-release/h2o/rel-zipf/2/Rjar/h2o.jar|https://s3.amazonaws.com/h2o-release/h2o/rel-zipf/2/Rjar/h2o.jar]
(This could take a few minutes, please be patient...)

is pointless as it does not appear until the download has completed, even on a terminal (on a console you would need to call flush.console()).{quote}

Timeout 60s: [https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/h2o-00install.html|https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/h2o-00install.html]

{noformat}* installing to library ‘/home/ripley/R/Lib32’

  • installing source package ‘h2o’ ...
    ** package ‘h2o’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** R
    ** demo
    ** inst
    ** byte-compile and prepare package for lazy loading
    Performing one-time download of h2o.jar from
    https://s3.amazonaws.com/h2o-release/h2o/rel-zipf/2/Rjar/h2o.jar
    (This could take a few minutes, please be patient...)
    Warning in download.file(url = h2o_url, destfile = temp_file, mode = "wb", :
    downloaded length 28444297 != reported length 174408125
    Warning in download.file(url = h2o_url, destfile = temp_file, mode = "wb", :
    URL 'https://s3.amazonaws.com/h2o-release/h2o/rel-zipf/2/Rjar/h2o.jar': Timeout of 60 seconds was reached
    Error in download.file(url = h2o_url, destfile = temp_file, mode = "wb", :
    download from 'https://s3.amazonaws.com/h2o-release/h2o/rel-zipf/2/Rjar/h2o.jar' failed
    Error: unable to load R code in package ‘h2o’
    Execution halted
    ERROR: lazy loading failed for package ‘h2o’
  • removing ‘/home/ripley/R/Lib32/h2o’

real 1:14.3
user 4.9
sys 1.0
{noformat}

@exalate-issue-sync
Copy link
Author

Erin LeDell commented: More info on {{timeout}} here: [https://rdrr.io/r/utils/download.file.html|https://rdrr.io/r/utils/download.file.html|smart-link]

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(1000, getOption("timeout"))}}

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Details

Jira Issue: PUBDEV-8145
Assignee: Erin LeDell
Reporter: Erin LeDell
State: Resolved
Fix Version: 3.32.1.3
Attachments: N/A
Development PRs: Available

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

Linked PRs from JIRA

#5492
#5503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants