Re:"The urlopen() and urlretrieve() functions can cause arbitrarily longdelays"

Discussion in 'Python' started by rh, Feb 24, 2013.

  1. rh

    rh Guest

    On Sun, 24 Feb 2013 11:48:57 -0600
    7segment <> wrote:

    > Hi!
    >
    > The subject is a segment of a sentence which I copied from Python's
    > official homepage. In whole, it reads:
    >
    > "The urlopen() and urlretrieve() functions can cause arbitrarily long
    > delays while waiting for a network connection to be set up. This
    > means that it is difficult to build an interactive Web client using
    > these functions without using threads."
    >
    > Here is my issue: I am testing my web site (which I have some
    > problems with), and comparing its response speed to a couple of other
    > sites, such as msn.com and python.org.


    Try some GETs with curl or wget.

    >
    > Now, it is very strange that python.org responds always under 0.5 s
    > while my site takes about 20 s to respond! And MSN about 60 seconds!
    > So it does not seem "arbitrary" to me. And I can figure out the
    > mechanisms behind the long delays.


    Transparent proxies, edge caches, poorly configured DNS, etc.
    Lots of things can cause delays. Check your server's logs and tell if your
    server is causing the delay.

    >
    > What I am wondering is if there's another way for me to go about. I
    > didn't really find any solutions with "threads" as suggested by
    > python's document base. Any suggestions?

    What have you tried? Post your code.
    rh, Feb 24, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page