Skip to content

Too many open files

1 message · Markus Loecher

#
Dear all,
Did this problem that was posted in 2006 (see below) ever got fully resolved
?
I am encountering the exact same issue
; I have executed get.hist.quote() in a loop and now R not only refuses to
establish any further connections to yahoo, but, worse, it will not open any
files either. For example, I cannot even save my current workspace for that
reason.
I tried 
  closeAllConnections()
As well as 
  showConnections()
But I do not see any open connections.
Also, does get.hist.quote() not close its connection internally once it is
done ?

Any help would be immensely useful as I am quite stuck.
Thanks!

Markus



Re: [R] Too many open files

    * This message: [ Message body ] [ More options ]
    * Related messages: [ Next message ] [ Previous message ] [ In reply to
] [ [R] error reports ] [ Next in thread ]

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Sat 27 May 2006 - 09:21:36 EST

"Omar Lakkis" <uofiowa at gmail.com> writes:
Inside your loop you need to close the connection object created by url().

for (i in 1:500) {

    con <- url(urls[i])
    ## ... stuff here ...
    close(con)
}

R only allows you to have a fixed number of open connections at one time,
and they do not get closed automatically when they go out of scope. These
commands may help make clear how things work...
description class mode text isopen can read can write
From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat 27 May 2006 - 09:47:20 EST

Try closeAllConnections()