[IPython-User] Slow startup for IPython qtconsole

Antony Lee antony.lee@berkeley....
Sun Sep 1 16:02:56 CDT 2013

I gave it one more try by replacing the
PUBLIC_IPS="socket.gethostbyname_ex(hostname)" line in
IPython.utils.localinterfaces by the literal value of the public ip of the
server.  Now the qtconsole (or just kernel) startup quickly reaches the
warning about issue 2049 (ctrl-c not working), but then hangs again for a
dozen of seconds or so.  Using faulthandler, I can see that the traceback
at that point is

Thread 0x00007f3196ffd700:
  File "/usr/lib/python3.3/threading.py", line 184 in wait
  File "/usr/lib/python3.3/threading.py", line 328 in wait
  File "/usr/lib/python3.3/site-packages/IPython/core/history.py", line 729
in run
  File "/usr/lib/python3.3/site-packages/IPython/core/history.py", line 65
in needs_sqlite
  File "<string>", line 2 in run
  File "/usr/lib/python3.3/threading.py", line 637 in _bootstrap_inner
  File "/usr/lib/python3.3/threading.py", line 614 in _bootstrap

Thread 0x00007f319cbf0700:
  File "/usr/lib/python3.3/site-packages/IPython/kernel/zmq/heartbeat.py",
line 55 in run
  File "/usr/lib/python3.3/threading.py", line 637 in _bootstrap_inner
  File "/usr/lib/python3.3/threading.py", line 614 in _bootstrap

Current thread 0x00007f31a8e54700:
  File "/usr/lib/python3.3/site-packages/zmq/sugar/poll.py", line 97 in poll
  File "/usr/lib/python3.3/site-packages/zmq/eventloop/ioloop.py", line 130
in poll
  File "/usr/lib/python3.3/site-packages/tornado/ioloop.py", line 646 in
  File "/usr/lib/python3.3/site-packages/zmq/eventloop/ioloop.py", line 182
in start
  File "/usr/lib/python3.3/site-packages/IPython/kernel/zmq/kernelapp.py",
line 457 in start
  File "/usr/lib/python3.3/site-packages/IPython/terminal/ipapp.py", line
356 in start
  File "/usr/lib/python3.3/site-packages/IPython/config/application.py",
line 539 in launch_instance
  File "/usr/lib/python3.3/site-packages/IPython/__init__.py", line 118 in
  File "/usr/bin/ipython", line 9 in <module>

Any hint as to how I could get further?  Thanks in advance,

2013/8/13 Antony Lee <antony.lee@berkeley.edu>

> Hi,
> I understand that this issue is only tangentially related to IPython
> itself but perhaps someone can help me...  On my lab's server, which is
> behind a router, IPython qtconsole startup is extremely slow.  "Ctrl-C
> profiling" shows that the bottleneck is in the call to
> "socket.gethostbyname_ex(hostname)" in IPython.utils.localinterfaces.  In
> fact, I checked that this single calls takes many seconds to complete.  Can
> that be due to some router misconfiguration?  Or is there a way around
> that?  (I do not need my kernels be accessible over the network...)
> Thanks in advance,
> Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130901/2c1a0db4/attachment.html 

More information about the IPython-User mailing list