title: Rscript Resolving timed out after 10000 milliseconds
body: <p>The following <code>R</code> script can run as expected on Windows. However, on Linux, using the command <code>Rscript</code>, it returns the error:</p>
  
  <pre><code>Error in open.connection(x, "rb") :
    Timeout was reached: Resolving timed out after 10000 milliseconds
  Calls: read_html -&gt; read_html.default
  Execution halted
  </code></pre>
  
  <p>The code has set <code>options(timeout= 4000000)</code>, but why still timed out? Why the same code can run correctly on Windows?  How to address this issue?</p>
  
  <p>By the way, the script was run normally on the same Linux machine one week ago.</p>
  
  <pre><code>#start
  library(data.table)
  library(xml2)
  library(rvest)
  library(stringr)
  library(stringi)
  library(mailR)
  
  options(timeout= 4000000)
  
  ranktitle &lt;- read.csv("/tmp/title.csv",header = TRUE,stringsAsFactors = FALSE)
  i &lt;- c(1,2,3,4,5,6,7,8,9,15)
  
  crawler &lt;- data.frame()
  basicURL &lt;- "http://www.xiaohulu.com/rank/?plat="
  for (m in i){
    date &lt;- Sys.Date()
    urldate &lt;- date-1
    #url list loop
    url &lt;- str_c(basicURL,m)
  
    web &lt;- read_html(url,encoding = "UTF-8")
    #read html code
  
    platformdata &lt;- web %&gt;% html_nodes("dd") %&gt;%  html_text()
    #read platformname
  
    platform &lt;- web %&gt;% html_nodes("h2")  %&gt;%  html_text()
    #read ranknum
  
    platformdata &lt;- platformdata[(1:16)]
    platform &lt;- rep(platform,16)
    #adjust platformname
    datelist &lt;- rep(urldate,16)
    #adjust datelist
  
    crawlera &lt;- data.frame(datelist,ranktitle,platform,platformdata)
    #write into dataframe
    crawler &lt;- rbind(crawler,crawlera)
  }
  #wirtefile
  csvFileName &lt;- paste("/tmp/results/platform",date,".csv",sep="")
  write.csv(crawler,file = csvFileName)
  </code></pre>
  
  <p>The content of the '<code>title.csv</code>':</p>
  
  <pre><code>title
  礼物价值
  礼物价值
  礼物价值
  礼物价值-1
  弹幕条数
  弹幕条数
  弹幕条数
  弹幕条数-1
  </code></pre>