Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39810

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

From rh <richard_hubbe11@lavabit.com>
Subject Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays"
Date 2013-02-24 14:46 -0800
References <9-GdnYm7wMIUz7fMnZ2dnUVZ8rydnZ2d@giganews.com>
Newsgroups comp.lang.python
Message-ID <mailman.2449.1361746001.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, 24 Feb 2013 11:48:57 -0600
7segment <7segment@live.com> 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.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

"The urlopen() and urlretrieve() functions can cause arbitrarily long delays" 7segment <7segment@live.com> - 2013-02-24 11:48 -0600
  Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" Ian Kelly <ian.g.kelly@gmail.com> - 2013-02-24 11:55 -0700
    Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" 7segment <7segment@live.com> - 2013-02-24 13:25 -0600
  Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" MRAB <python@mrabarnett.plus.com> - 2013-02-24 19:04 +0000
    Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" 7segment <7segment@live.com> - 2013-02-24 13:27 -0600
      Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2013-02-24 22:30 +0100
  Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays" rh <richard_hubbe11@lavabit.com> - 2013-02-24 14:46 -0800

csiph-web