gethostbyname_ex(hostname) extremely slow

后端 未结 1 1692
春和景丽
春和景丽 2020-12-21 20:11

At startup, IPython (qtconsole) calls socket.gethostbyname_ex(socket.gethostname())[2] to find a list of IP addresses that point to the machine. On a Linux ser

相关标签:
1条回答
  • 2020-12-21 20:32

    I had a similar problem. It happened that my hostname was localhost.localdomain, being lazy when installing the OS.

    The solution was to give it a sane name by sudo vi /etc/hostname and changing it to myname.mydomain and now it runs in 1s.

    0 讨论(0)
提交回复
热议问题