I use readLines (text url) in a script where readLines (text url) is called several hundred times, where each text url is unique.
After about 125 calls to readLines (text url), I got an error, "all connections are in use."
When I check my open connections with showConnections (all = TRUE), for URL connections I see:
description class ... isopen "www.site.com" "url" ... "closed" ...
How to remove these closed connections from environment R so that I can open new connections?
Also, I tried opening the URLs before passing, passing the url connection to readLines, and then closing the connection after the connection was completed, and still encountering the same problem.
source share