[racket] host not found error

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Sun May 6 16:29:23 EDT 2012

On Sunday, May 6, 2012, prad wrote:

> i'm trying to understand a consistent error i'm getting while using a
> racket program to get data from a website.
> i'm accessing the site to download certain posts using regexps and store
> them in sqlite3.
> things go perfectly till i accumulate 336 records and then this error
> crashes my script:

Hi prad,

Are you doing the open-input-url in a loop, out of curiosity?  If so, do
you close the opened ports between each loop  iteration?

336 is a very specific observation.  Is it repeatable?

tcp-connect: connection to www.30bananasaday.com, port 80 failed; host
> not found (at step 1: Host name lookup failure; errno=2)
> so if it is a lookup failure that suggests the resolving server doesn't
> like me after a certain number of lookups within a specific period of
> time? is this reasoning correct?

This particular error seems to be blaming host name lookup.  As far as I
understand, the error's occuring even before you program can contact the
remote server, if I understand the error message.  Odd.  If it were some
kind of deliberate rate limiting, I'd expect a different class of error
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120506/4a2ccb4a/attachment-0001.html>

Posted on the users mailing list.