seandavi / GEOquery

The bridge between the NCBI Gene Expression Omnibus and Bioconductor
http://seandavi.github.io/GEOquery/
Other
87 stars 36 forks source link

Make `timeout` configurable in `downloadFile()` #139

Closed yihui closed 1 year ago

yihui commented 1 year ago

The default 120 seconds may not be enough, e.g., #138 and https://d.cosx.org/d/423763

Timeout was reached: [] Operation timed out after 120000 milliseconds with 47824896 out of 156738322 bytes received...

After this PR, they can increase the value by, e.g., options(timeout = 600) (10 mins).

options('timeout') defaults to 60 in base R, so this PR won't change your default (max(60, 120) == 120).

khughitt commented 1 year ago

Nice and simple fix :+1:

It's probably also worth modifying the similar call in getGEOSuppFiles.R.

khughitt commented 1 year ago

One more place that needs to be modified is parseGEO.R:getAndParseGSEMatrices:

Error in open.connection(x, "rb") :
  Timeout was reached: [ftp.ncbi.nlm.nih.gov] Resolving timed out after 10000 milliseconds
Calls: download_geo ... getAndParseGSEMatrices -> getDirListing -> <Anonymous> -> read_html.default
Execution halted
yihui commented 1 year ago

I can definitely do that, but first we need to get @seandavi's attention.

jacorvar commented 11 months ago

Hi,

in spite of increasing timeout with options(timeout=3000), downloadFile keeps using 120 seconds. Am I doing something wrong?

I've installed the latest version using install_github('seandavi/GEOquery') and R version 4.3.1 (2023-06-16).

yihui commented 11 months ago

Make sure to restart R after (re)installing a package.