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


Groups > comp.lang.python > #53528

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'hosts': 0.07; 'subject:skip:s 10': 0.07; 'imply': 0.09; 'downside': 0.16; 'file;': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'lookups': 0.16; 'roy': 0.16; 'subject:slow': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'code,': 0.22; 'certainly': 0.24; '(or': 0.24; 'changes,': 0.26; 'equivalent': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'fixed': 0.29; 'am,': 0.29; 'subject:) ': 0.29; 'message- id:@mail.gmail.com': 0.30; 'sep': 0.31; 'subject:from': 0.34; 'subject: (': 0.35; "can't": 0.35; 'something': 0.35; 'received:google.com': 0.35; 'entry': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'issue': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'you.': 0.62; 'subject:skip:g 10': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=cCOIRCcsmI8v0ZTFvOUw2IEThFmZAFA/wFxcOveVWnc=; b=0rbnYWJ/UI6skbKgTJ1EovFL6bbzvLGxjOmDs7VFy5VEI23fGZLXi3Hn/LxNW8zDND LqW3UiPy8GIbAfvBWUyHiKOdrFNV9zBUDRxpPYBX5Sh+h+0d5kLvXg99eIrIeVAC0Ds1 JsAyqq+Dt/lzk++lUpd2+/5LMVkTDaxXQqPpiMJduaNIyfX/rIZWxSppiTtzTFgKm32/ NQiUvGJGO8+ySk0yPspi0A27FMGaE3JfXrdiBwK/JuDw1gRB/8IaUCfR655pdVKZb+YD TuqDOoB20+TUYWn7lZTKmf+xPfzlkhMv12VBSU/3DdFcocDkmUWBfBqnkQRji+CeOb4G 9dIg==
MIME-Version 1.0
X-Received by 10.58.100.234 with SMTP id fb10mr25228250veb.5.1378156365624; Mon, 02 Sep 2013 14:12:45 -0700 (PDT)
In-Reply-To <3f4962dc-b139-4a67-8d0f-f2d59952a45f@googlegroups.com>
References <b9f77b6f-3a65-407a-aff5-5677be2ba228@googlegroups.com> <mailman.446.1378035456.19984.python-list@python.org> <9cca25d5-186d-4a92-893c-f7985fad7a55@googlegroups.com> <mailman.459.1378069438.19984.python-list@python.org> <00843d58-db21-4cf0-9430-85362a1dd66f@googlegroups.com> <roy-3E5377.08452602092013@news.panix.com> <3f4962dc-b139-4a67-8d0f-f2d59952a45f@googlegroups.com>
Date Tue, 3 Sep 2013 07:12:45 +1000
Subject Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.515.1378156372.19984.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1378156372 news.xs4all.nl 15885 [2001:888:2000:d::a6]:48262
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:53528

Show key headers only | View raw


On Tue, Sep 3, 2013 at 3:52 AM,  <anntzer.lee@gmail.com> wrote:
> To be honest, knowing nothing about DNS configuration, I don't even know if adding the entry to /etc/hosts is the "proper" fix or if the issue should be fixed somewhere else (or perhaps "didn't know", as you seem to imply that that is not the correct way).

Since you can't change the code, it's almost certainly the best
solution available to you. It's more-or-less equivalent to speeding up
your DNS lookups massively. The main downside is that if something
changes, you need to change it in DNS and in your hosts file; as Roy
says, it's a pragmatic solution rather than a perfect one.

ChrisA

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


Thread

gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-08-31 17:03 -0700
  Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-08-31 21:01 -0400
    Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-08-31 21:51 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Michael Torrie <torriem@gmail.com> - 2013-08-31 23:06 -0600
        Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 10:13 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-09-01 06:57 -0400
  Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-01 21:37 +1000
    Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 13:37 -0700
      Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-02 07:03 +1000
        Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-01 22:28 -0700
          Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-02 20:42 +1000
          Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Roy Smith <roy@panix.com> - 2013-09-02 08:45 -0400
            Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) anntzer.lee@gmail.com - 2013-09-02 10:52 -0700
              Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow) Chris Angelico <rosuav@gmail.com> - 2013-09-03 07:12 +1000

csiph-web