From simon.urbanek at r-project.org  Tue Jul 12 23:44:27 2011
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Tue, 12 Jul 2011 17:44:27 -0400
Subject: [Rd] [linux] connection never times out
In-Reply-To: <87B38946-32A5-4B84-A649-52F02F248D22@r-project.org>
References: <1310473470487-3662088.post@n4.nabble.com>
	<4E1C7A25.9060605@statistik.tu-dortmund.de>
	<CABFfbXuoXctnrXB_Mw7MmOeuZT2Tjnm-ZfgexScjx_NNqF1q1g@mail.gmail.com>
	<4E1CA795.4030201@statistik.tu-dortmund.de>
	<CABFfbXtp-BGi8Kxd9+1pgysVpxQieFmdYEMh-NcKXxWOC=8ncw@mail.gmail.com>
	<87B38946-32A5-4B84-A649-52F02F248D22@r-project.org>
Message-ID: <04CE1008-3A51-4413-9B14-0BCE8C3FD00B@r-project.org>

Never mind, I found the issue - contrary to the documentation Linux does modify tv in the call to select() so our measure of elapsed time doesn't increase. Work-around now present in R-devel.

Cheers,
Simon


On Jul 12, 2011, at 5:23 PM, Simon Urbanek wrote:

> 
> On Jul 12, 2011, at 4:22 PM, Jeroen Ooms wrote:
> 
>>> Can you please verify the behaviour is still the same in a recent R-devel or
>>> at least R-2.13.1? And that there was no other already answered request on
>>> R-help or R-devel re. timeouts?
>> 
>> The code below is R 2.13.1. It shows that the timeout time is more
>> than 3 minutes, although it was set to 5 seconds.
>> 
> 
> Please set
> options(internet.info=0)
> and re-run your test.
> Are you running this from a command-line R or do you have any graphics or GUIs running? (I'm asking because any fast handler activity will cancel timeouts)
> 
> Thanks,
> Simon
> 
> 
>>> options(timeout=5)
>>> system.time(download.file("http://123.123.123.123", dest=tempfile()))
>> trying URL 'http://123.123.123.123'
>> Error in download.file("http://123.123.123.123", dest = tempfile()) :
>> cannot open URL 'http://123.123.123.123'
>> In addition: Warning message:
>> In download.file("http://123.123.123.123", dest = tempfile()) :
>> unable to connect to '123.123.123.123' on port 80.
>> Timing stopped at: 0 0 189.375
>>> sessionInfo()
>> R version 2.13.1 (2011-07-08)
>> Platform: i686-pc-linux-gnu (32-bit)
>> 
>> locale:
>> [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>> [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>> [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>> [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>> [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>> 
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>> 
>> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> 
>> 
> 



[Rd] [linux] connection never times out
Simon Urbanek