Hi all
I've seen this issue crop up a few times, but there doesn't seem to be a documented solution.
I've been using jupyter notebook with anaconda for a few months on my box (Win10). Everything worked fine. Today, I restarted my computer, and now jupyter is painfully slow to run. I uninstalled python, anaconda, and all python packages from my box and reinstalled Anaconda from here, and still see the same effect. Starting the kernel can take > a minute, when it took seconds previously. Also, after starting the notebook, it takes a few minutes before the cells can actually be executed (I see "kernel busy"). The cells do eventually run (the notebook in question has one cell with a "print" statement, so it's not terribly large).
I ran the server with --debug, and here's what I see:
[D 15:44:22.471 NotebookApp] Searching ['D:\\imdb_csv', 'C:\\Users\\mspryn\\.jupyter', 'C:\\ProgramData\\Anaconda3Reinstall\\etc\\jupyter', 'C:\\ProgramData\\jupyter'] for config files
[D 15:44:22.471 NotebookApp] Looking for jupyter_config in C:\ProgramData\jupyter
[D 15:44:22.471 NotebookApp] Looking for jupyter_config in C:\ProgramData\Anaconda3Reinstall\etc\jupyter
[D 15:44:22.471 NotebookApp] Looking for jupyter_config in C:\Users\mspryn\.jupyter
[D 15:44:22.475 NotebookApp] Looking for jupyter_config in D:\imdb_csv
[D 15:44:22.475 NotebookApp] Looking for jupyter_notebook_config in C:\ProgramData\jupyter
[D 15:44:22.475 NotebookApp] Looking for jupyter_notebook_config in C:\ProgramData\Anaconda3Reinstall\etc\jupyter
[D 15:44:22.475 NotebookApp] Loaded config file: C:\ProgramData\Anaconda3Reinstall\etc\jupyter\jupyter_notebook_config.json
[D 15:44:22.475 NotebookApp] Looking for jupyter_notebook_config in C:\Users\mspryn\.jupyter
[D 15:44:22.475 NotebookApp] Looking for jupyter_notebook_config in D:\imdb_csv
[D 15:44:24.171 NotebookApp] Paths used for configuration of jupyter_notebook_config:
C:\ProgramData\jupyter\jupyter_notebook_config.json
[D 15:44:24.172 NotebookApp] Paths used for configuration of jupyter_notebook_config:
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\jupyter_notebook_config.d\jupyterlab.json
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\jupyter_notebook_config.json
[D 15:44:24.173 NotebookApp] Paths used for configuration of jupyter_notebook_config:
C:\Users\mspryn\.jupyter\jupyter_notebook_config.json
[I 15:44:24.297 NotebookApp] JupyterLab beta preview extension loaded from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\jupyterlab
[I 15:44:24.297 NotebookApp] JupyterLab application directory is C:\ProgramData\Anaconda3Reinstall\share\jupyter\lab
[I 15:44:25.491 NotebookApp] Serving notebooks from local directory: D:\imdb_csv
[I 15:44:25.491 NotebookApp] 0 active kernels
[I 15:44:25.491 NotebookApp] The Jupyter Notebook is running at:
[I 15:44:25.492 NotebookApp] http://localhost:8888/?token=56b7146da8f70f5eeae6c8843cbcd4e67adec712bf0d5522
[I 15:44:25.492 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:44:25.498 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=56b7146da8f70f5eeae6c8843cbcd4e67adec712bf0d5522
[I 15:44:50.528 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[D 15:44:50.530 NotebookApp] Using contents: services/contents
[D 15:44:50.580 NotebookApp] Path base/images/favicon.ico served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\base\images\favicon.ico
[D 15:44:50.581 NotebookApp] Path components/jquery-ui/themes/smoothness/jquery-ui.min.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\jquery-ui\themes\smoothness\jquery-ui.min.css
[D 15:44:50.582 NotebookApp] Path components/jquery-typeahead/dist/jquery.typeahead.min.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\jquery-typeahead\dist\jquery.typeahead.min.css
[D 15:44:50.582 NotebookApp] Path style/style.min.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\style\style.min.css
[D 15:44:50.583 NotebookApp] Path components/es6-promise/promise.min.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\es6-promise\promise.min.js
[D 15:44:50.584 NotebookApp] Path components/preact/index.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\preact\index.js
[D 15:44:50.584 NotebookApp] Path components/proptypes/index.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\proptypes\index.js
[D 15:44:50.584 NotebookApp] Path components/preact-compat/index.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\preact-compat\index.js
[D 15:44:50.585 NotebookApp] Path components/requirejs/require.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\requirejs\require.js
[D 15:44:50.585 NotebookApp] Path base/images/logo.png served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\base\images\logo.png
[D 15:44:50.586 NotebookApp] Path tree/js/main.min.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\tree\js\main.min.js
[D 15:44:50.589 NotebookApp] 200 GET /tree?token=8cefdd855b6080e8adc6dc338478a135d2982bf2f3a50ab6 (::1) 61.35ms
[D 15:44:50.615 NotebookApp] Path custom.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\custom\custom.css
[D 15:44:50.616 NotebookApp] 304 GET /custom/custom.css (::1) 1.99ms
[D 15:44:50.989 NotebookApp] Path services\contents.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\services\contents.js
[D 15:44:50.990 NotebookApp] 200 GET /static/services/contents.js?v=20180316154422 (::1) 1.99ms
[D 15:44:51.006 NotebookApp] Paths used for configuration of tree:
C:\ProgramData\jupyter\nbconfig\tree.json
[D 15:44:51.006 NotebookApp] Paths used for configuration of tree:
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\nbconfig\tree.json
[D 15:44:51.007 NotebookApp] Paths used for configuration of tree:
C:\Users\mspryn\.jupyter\nbconfig\tree.json
[D 15:44:51.007 NotebookApp] 200 GET /api/config/tree?_=1521240290713 (::1) 3.00ms
[D 15:44:51.015 NotebookApp] 200 GET /api/terminals?_=1521240290715 (::1) 1.00ms
[D 15:44:51.020 NotebookApp] 200 GET /api/sessions?_=1521240290716 (::1) 1.00ms
[D 15:44:51.052 NotebookApp] 200 GET /api/contents?type=directory&_=1521240290718 (::1) 8.98ms
[D 15:44:51.950 NotebookApp] Path custom.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\custom\custom.js
[D 15:44:51.951 NotebookApp] 200 GET /custom/custom.js?v=20180316154422 (::1) 2.00ms
[D 15:45:02.352 NotebookApp] Found kernel python3 in C:\ProgramData\Anaconda3Reinstall\share\jupyter\kernels
[D 15:45:02.355 NotebookApp] 200 GET /api/kernelspecs (::1) 5.49ms
[D 15:45:02.356 NotebookApp] 200 GET /api/terminals?_=1521240290717 (::1) 0.50ms
[D 15:45:02.358 NotebookApp] Paths used for configuration of common:
C:\ProgramData\jupyter\nbconfig\common.json
[D 15:45:02.360 NotebookApp] Paths used for configuration of common:
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\nbconfig\common.json
[D 15:45:02.363 NotebookApp] Paths used for configuration of common:
C:\Users\mspryn\.jupyter\nbconfig\common.json
[D 15:45:02.367 NotebookApp] 200 GET /api/config/common?_=1521240290714 (::1) 10.47ms
[D 15:45:04.453 NotebookApp] 200 GET /api/terminals?_=1521240290720 (::1) 0.50ms
[D 15:45:04.456 NotebookApp] 200 GET /api/sessions?_=1521240290719 (::1) 2.00ms
[D 15:45:04.478 NotebookApp] 200 GET /api/contents?type=directory&_=1521240290721 (::1) 12.96ms
[D 15:45:06.488 NotebookApp] Using contents: services/contents
[D 15:45:06.537 NotebookApp] Path base/images/favicon-notebook.ico served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\base\images\favicon-notebook.ico
[D 15:45:06.537 NotebookApp] Path components/bootstrap-tour/build/css/bootstrap-tour.min.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\bootstrap-tour\build\css\bootstrap-tour.min.css
[D 15:45:06.540 NotebookApp] Path components/codemirror/lib/codemirror.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\codemirror\lib\codemirror.css
[D 15:45:06.542 NotebookApp] Path notebook/css/override.css served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\notebook\css\override.css
[D 15:45:06.544 NotebookApp] Path components/text-encoding/lib/encoding.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\text-encoding\lib\encoding.js
[D 15:45:06.545 NotebookApp] Path notebook/js/main.min.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\notebook\js\main.min.js
[D 15:45:06.551 NotebookApp] 200 GET /notebooks/Untitled.ipynb (::1) 63.85ms
[D 15:45:06.566 NotebookApp] Path components\MathJax\MathJax.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\MathJax.js
[D 15:45:06.567 NotebookApp] 304 GET /static/components/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,Safe&delayStartupUntil=configured (::1) 1.99ms
[D 15:45:06.572 NotebookApp] 304 GET /custom/custom.css (::1) 1.99ms
[D 15:45:06.598 NotebookApp] Path components\MathJax\config\TeX-AMS-MML_HTMLorMML-full.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\config\TeX-AMS-MML_HTMLorMML-full.js
[D 15:45:06.599 NotebookApp] 304 GET /static/components/MathJax/config/TeX-AMS-MML_HTMLorMML-full.js?rev=2.6.0 (::1) 1.99ms
[D 15:45:06.683 NotebookApp] Path components\MathJax\config\Safe.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\config\Safe.js
[D 15:45:06.684 NotebookApp] 304 GET /static/components/MathJax/config/Safe.js?rev=2.6.0 (::1) 2.00ms
[D 15:45:06.726 NotebookApp] Paths used for configuration of notebook:
C:\ProgramData\jupyter\nbconfig\notebook.json
[D 15:45:06.731 NotebookApp] Paths used for configuration of notebook:
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\nbconfig\notebook.json
[D 15:45:06.734 NotebookApp] Paths used for configuration of notebook:
C:\Users\mspryn\.jupyter\nbconfig\notebook.json
[D 15:45:06.736 NotebookApp] 200 GET /api/config/notebook?_=1521240306714 (::1) 10.97ms
[D 15:45:06.740 NotebookApp] Paths used for configuration of common:
C:\ProgramData\jupyter\nbconfig\common.json
[D 15:45:06.742 NotebookApp] Paths used for configuration of common:
C:\ProgramData\Anaconda3Reinstall\etc\jupyter\nbconfig\common.json
[D 15:45:06.745 NotebookApp] Paths used for configuration of common:
C:\Users\mspryn\.jupyter\nbconfig\common.json
[D 15:45:06.747 NotebookApp] 200 GET /api/config/common?_=1521240306715 (::1) 8.98ms
[D 15:45:06.758 NotebookApp] Path components\MathJax\extensions\MathML\content-mathml.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\extensions\MathML\content-mathml.js
[D 15:45:06.759 NotebookApp] 200 GET /static/components/MathJax/extensions/MathML/content-mathml.js?rev=2.6.0 (::1) 2.00ms
[D 15:45:06.787 NotebookApp] Found kernel python3 in C:\ProgramData\Anaconda3Reinstall\share\jupyter\kernels
[D 15:45:06.789 NotebookApp] 304 GET /api/kernelspecs (::1) 3.00ms
[D 15:45:07.039 NotebookApp] 200 GET /api/contents/Untitled.ipynb?type=notebook&_=1521240306716 (::1) 233.43ms
[D 15:45:07.042 NotebookApp] 304 GET /custom/custom.js?v=20180316154422 (::1) 2.00ms
[D 15:45:07.044 NotebookApp] Path components\MathJax\jax\output\HTML-CSS\fonts\STIX-Web\fontdata.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\jax\output\HTML-CSS\fonts\STIX-Web\fontdata.js
[D 15:45:07.046 NotebookApp] 304 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.6.0 (::1) 2.99ms
[D 15:45:07.048 NotebookApp] Path jupyter-js-widgets\extension.js served from C:\ProgramData\Anaconda3Reinstall\share\jupyter\nbextensions\jupyter-js-widgets\extension.js
[D 15:45:07.055 NotebookApp] 200 GET /nbextensions/jupyter-js-widgets/extension.js?v=20180316154422 (::1) 7.98ms
[D 15:45:07.203 NotebookApp] Starting kernel: ['C:\\ProgramData\\Anaconda3Reinstall\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\mspryn\\AppData\\Roaming\\jupyter\\runtime\\kernel-32939d39-f4ac-427e-8aab-f3590be3a96e.json']
[D 15:45:07.231 NotebookApp] Connecting to: tcp://127.0.0.1:20578
[D 15:45:55.349 NotebookApp] Connecting to: tcp://127.0.0.1:20576
[I 15:46:08.393 NotebookApp] Kernel started: 32939d39-f4ac-427e-8aab-f3590be3a96e
[D 15:46:08.393 NotebookApp] Kernel args: {'kernel_name': 'python3', 'cwd': 'D:\\imdb_csv'}
[D 15:46:08.398 NotebookApp] 201 POST /api/sessions (::1) 61284.67ms
[D 15:46:08.403 NotebookApp] Path components\MathJax\extensions\Safe.js served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\components\MathJax\extensions\Safe.js
[D 15:46:08.406 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?rev=2.6.0 (::1) 3.99ms
[D 15:46:08.409 NotebookApp] 200 GET /api/contents/Untitled.ipynb/checkpoints?_=1521240306717 (::1) 2.49ms
[D 15:46:21.518 NotebookApp] Initializing websocket connection /api/kernels/32939d39-f4ac-427e-8aab-f3590be3a96e/channels
[D 15:46:21.520 NotebookApp] Requesting kernel info from 32939d39-f4ac-427e-8aab-f3590be3a96e
[D 15:46:21.522 NotebookApp] Connecting to: tcp://127.0.0.1:20575
[W 15:46:41.711 NotebookApp] Timeout waiting for kernel_info reply from 32939d39-f4ac-427e-8aab-f3590be3a96e
[D 15:46:41.712 NotebookApp] 101 GET /api/kernels/32939d39-f4ac-427e-8aab-f3590be3a96e/channels?session_id=5b54d86db137429c827490531657b8f8 (::1) 20194.53ms
[D 15:46:41.715 NotebookApp] Opening websocket /api/kernels/32939d39-f4ac-427e-8aab-f3590be3a96e/channels
[D 15:46:41.718 NotebookApp] Getting buffer for 32939d39-f4ac-427e-8aab-f3590be3a96e
[D 15:46:41.719 NotebookApp] Connecting to: tcp://127.0.0.1:20575
[D 15:46:52.912 NotebookApp] Connecting to: tcp://127.0.0.1:20576
[D 15:47:07.608 NotebookApp] Connecting to: tcp://127.0.0.1:20577
[D 15:47:19.189 NotebookApp] 200 GET /api/contents/Untitled.ipynb?content=0&_=1521240306718 (::1) 1.50ms
[I 15:47:19.203 NotebookApp] Saving file at /Untitled.ipynb
[D 15:47:19.203 NotebookApp] Saving D:\imdb_csv\Untitled.ipynb
[D 15:47:19.513 NotebookApp] 200 PUT /api/contents/Untitled.ipynb (::1) 310.99ms
[D 15:48:02.485 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.488 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.490 NotebookApp] Received kernel info: {'status': 'ok', 'protocol_version': '5.1', 'implementation': 'ipython', 'implementation_version': '6.2.1', 'language_info': {'name': 'python', 'version': '3.6.4', 'mimetype': 'text/x-python', 'codemirror_mode': {'name': 'ipython', 'version': 3}, 'pygments_lexer': 'ipython3', 'nbconvert_exporter': 'python', 'file_extension': '.py'}, 'banner': "Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]\nType 'copyright', 'credits' or 'license' for more information\nIPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.\n", 'help_links': [{'text': 'Python Reference', 'url': 'https://docs.python.org/3.6'}, {'text': 'IPython Reference', 'url': 'https://ipython.org/documentation.html'}, {'text': 'NumPy Reference', 'url': 'https://docs.scipy.org/doc/numpy/reference/'}, {'text': 'SciPy Reference', 'url': 'https://docs.scipy.org/doc/scipy/reference/'}, {'text': 'Matplotlib Reference', 'url': 'https://matplotlib.org/contents.html'}, {'text': 'SymPy Reference', 'url': 'http://docs.sympy.org/latest/index.html'}, {'text': 'pandas Reference', 'url': 'https://pandas.pydata.org/pandas-docs/stable/'}]}
[I 15:48:02.491 NotebookApp] Adapting to protocol v5.1 for kernel 32939d39-f4ac-427e-8aab-f3590be3a96e
[D 15:48:02.493 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.496 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.500 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.501 NotebookApp] Path base\images\favicon-notebook.ico served from C:\ProgramData\Anaconda3Reinstall\lib\site-packages\notebook\static\base\images\favicon-notebook.ico
[D 15:48:02.506 NotebookApp] 304 GET /static/base/images/favicon-notebook.ico (::1) 5.98ms
[D 15:48:02.508 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.510 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.514 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:02.514 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: execute_input
IOStream.flush timed out
[D 15:48:13.031 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: stream
[D 15:48:13.036 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:13.039 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:13.041 NotebookApp] activity on 32939d39-f4ac-427e-8aab-f3590be3a96e: status
[D 15:48:13.047 NotebookApp] 304 GET /static/base/images/favicon-notebook.ico (::1) 1.99ms
The unusual slowdown happens at this point:
[D 15:46:41.719 NotebookApp] Connecting to: tcp://127.0.0.1:20575
[D 15:46:52.912 NotebookApp] Connecting to: tcp://127.0.0.1:20576
[D 15:47:07.608 NotebookApp] Connecting to: tcp://127.0.0.1:20577
I have a working installation on my laptop, and those API calls each took on the orders of milliseconds to execute. Seems like there's a problem when jupyter tries to talk to the kernel, but I don't know how to debug this further. Does anyone know what can be going on? BTW, the ports are open, here are the relevant entries from "netstat -na":
TCP 127.0.0.1:1434 0.0.0.0:0 LISTENING
TCP 127.0.0.1:5354 0.0.0.0:0 LISTENING
TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING
TCP 127.0.0.1:19656 0.0.0.0:0 LISTENING
TCP 127.0.0.1:19817 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20505 127.0.0.1:20506 ESTABLISHED
TCP 127.0.0.1:20506 127.0.0.1:20505 ESTABLISHED
TCP 127.0.0.1:20575 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20575 127.0.0.1:20707 ESTABLISHED
TCP 127.0.0.1:20576 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20576 127.0.0.1:20700 ESTABLISHED
TCP 127.0.0.1:20576 127.0.0.1:20712 ESTABLISHED
TCP 127.0.0.1:20577 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20577 127.0.0.1:20718 ESTABLISHED
TCP 127.0.0.1:20578 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20578 127.0.0.1:20678 ESTABLISHED
TCP 127.0.0.1:20579 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20580 127.0.0.1:20581 ESTABLISHED
TCP 127.0.0.1:20581 127.0.0.1:20580 ESTABLISHED
TCP 127.0.0.1:20584 127.0.0.1:20585 ESTABLISHED
TCP 127.0.0.1:20585 127.0.0.1:20584 ESTABLISHED
TCP 127.0.0.1:20596 127.0.0.1:20599 ESTABLISHED
TCP 127.0.0.1:20597 127.0.0.1:20598 ESTABLISHED
TCP 127.0.0.1:20598 127.0.0.1:20597 ESTABLISHED
TCP 127.0.0.1:20599 127.0.0.1:20596 ESTABLISHED
TCP 127.0.0.1:20607 127.0.0.1:20609 ESTABLISHED
TCP 127.0.0.1:20608 127.0.0.1:20610 ESTABLISHED
TCP 127.0.0.1:20609 127.0.0.1:20607 ESTABLISHED
TCP 127.0.0.1:20610 127.0.0.1:20608 ESTABLISHED
TCP 127.0.0.1:20631 127.0.0.1:20634 ESTABLISHED
TCP 127.0.0.1:20632 127.0.0.1:20633 ESTABLISHED
TCP 127.0.0.1:20633 127.0.0.1:20632 ESTABLISHED
TCP 127.0.0.1:20634 127.0.0.1:20631 ESTABLISHED
TCP 127.0.0.1:20636 127.0.0.1:20639 ESTABLISHED
TCP 127.0.0.1:20637 127.0.0.1:20638 ESTABLISHED
TCP 127.0.0.1:20638 127.0.0.1:20637 ESTABLISHED
TCP 127.0.0.1:20639 127.0.0.1:20636 ESTABLISHED
TCP 127.0.0.1:20652 127.0.0.1:20653 ESTABLISHED
TCP 127.0.0.1:20653 127.0.0.1:20652 ESTABLISHED
TCP 127.0.0.1:20678 127.0.0.1:20578 ESTABLISHED
TCP 127.0.0.1:20680 127.0.0.1:20681 ESTABLISHED
TCP 127.0.0.1:20681 127.0.0.1:20680 ESTABLISHED
TCP 127.0.0.1:20696 127.0.0.1:20697 ESTABLISHED
TCP 127.0.0.1:20697 127.0.0.1:20696 ESTABLISHED
TCP 127.0.0.1:20698 127.0.0.1:20699 ESTABLISHED
TCP 127.0.0.1:20699 127.0.0.1:20698 ESTABLISHED
TCP 127.0.0.1:20700 127.0.0.1:20576 ESTABLISHED
TCP 127.0.0.1:20701 127.0.0.1:20702 ESTABLISHED
TCP 127.0.0.1:20702 127.0.0.1:20701 ESTABLISHED
TCP 127.0.0.1:20706 0.0.0.0:0 LISTENING
TCP 127.0.0.1:20707 127.0.0.1:20575 ESTABLISHED
TCP 127.0.0.1:20708 127.0.0.1:20709 ESTABLISHED
TCP 127.0.0.1:20709 127.0.0.1:20708 ESTABLISHED
TCP 127.0.0.1:20710 127.0.0.1:20711 ESTABLISHED
TCP 127.0.0.1:20711 127.0.0.1:20710 ESTABLISHED
TCP 127.0.0.1:20712 127.0.0.1:20576 ESTABLISHED
TCP 127.0.0.1:20713 127.0.0.1:20716 ESTABLISHED
TCP 127.0.0.1:20714 127.0.0.1:20715 ESTABLISHED
TCP 127.0.0.1:20715 127.0.0.1:20714 ESTABLISHED
TCP 127.0.0.1:20716 127.0.0.1:20713 ESTABLISHED
TCP 127.0.0.1:20718 127.0.0.1:20577 ESTABLISHED
TCP 127.0.0.1:20719 127.0.0.1:20720 ESTABLISHED
TCP 127.0.0.1:20720 127.0.0.1:20719 ESTABLISHED
TCP 127.0.0.1:20721 127.0.0.1:20722 ESTABLISHED
TCP 127.0.0.1:20722 127.0.0.1:20721 ESTABLISHED
TCP 127.0.0.1:20724 127.0.0.1:20725 ESTABLISHED
TCP 127.0.0.1:20725 127.0.0.1:20724 ESTABLISHED
TCP 127.0.0.1:20726 127.0.0.1:20727 ESTABLISHED
TCP 127.0.0.1:20727 127.0.0.1:20726 ESTABLISHED
TCP 127.0.0.1:20728 127.0.0.1:20729 ESTABLISHED
TCP 127.0.0.1:20729 127.0.0.1:20728 ESTABLISHED
TCP 127.0.0.1:20738 127.0.0.1:20739 ESTABLISHED
TCP 127.0.0.1:20739 127.0.0.1:20738 ESTABLISHED
Few more pieces of information:
1) I copied my entire anaconda installation (the 'Anaconda3' folder) from my working laptop over to my broken desktop. I still see the slowdown.
2) ipython starts instantly from the terminal.
3) Some cells finish. A simple "print('foo')" will finish after a minute or two. But some more complex cells don't. For example, I have a (relatively simple) plot with matplotlib that ran for >10 minutes.
There have indeed been a few issues about mysterious slowdowns, and I don't know what causes them. Do you have any internet security software? We've sometimes seen problems with security software interfering with our connections.
The sockets use ZeroMQ as a communications layer, and I think there's some kind of handshake involved. Maybe that is being delayed somehow. To test this theory, run:
import zmq
ctx = zmq.Context.instance()
sock = ctx.socket(zmq.DEALER)
sock.connect("tcp://127.0.0.1:12345") # Use the port for the shell or control socket
Beyond that, @minrk is the ZMQ expert.
I have no security software besides windows defender installed. Unfortunately, this is a work PC, so I can't fully turn it off. I did add a rule that allowed all connections both incoming and outgoing, and still saw the same effect. Besides, if the security software were the issue, I'd expect that the connection would be fully blocked, and nothing would work.
Unfortunately, I had to get this up and running quickly, so I had to resort to the nuclear option: I did a system restore from a few days ago. Looking through the windows update history and the affected drivers, the only thing that seemed to be installed was a security update for SQL server (KB4058560), which was reverted during the system restore. After the restore, everything seems to be functioning as expected. It doesn't make sense to me that an update for SQL server would interfere with jupyter, but that's the only thing that seems to have changed. ¯_(ツ)_/¯
So, although I don't have a great answer as to why this happened, there's nothing really more to do at the moment. I'll close this issue. If this crops up again, I'll try the code you suggested. Thanks for the prompt response!
I can't think of any reason that an SQL server update would affect it either. Weird!
We have experienced a similar issue. It took Jupyter Notebook 17s to respond (sometimes it's longer). Here's the snippet of the log: (Notice the time stamps went from 13:56:04.302 to 13:56:21.355). Any suggestions on what to try?
```[D 13:56:03.948 NotebookApp] 200 GET /api/config/common?_=1545425763800 (127.0.0.1) 2.51ms
[D 13:56:03.972 NotebookApp] 304 GET /static/components/MathJax/extensions/MathML/content-mathml.js?V=2.7.5 (127.0.0.1) 1.00ms
[D 13:56:04.000 NotebookApp] Found kernel python3 in
[D 13:56:04.002 NotebookApp] 304 GET /api/kernelspecs (127.0.0.1) 2.98ms
[D 13:56:04.036 NotebookApp] 200 GET /api/contents/93483605a45ec36cd60ed0411dfa5f26/1/workbook.ipynb?type=notebook&_=1545425763801 (127.0.0.1) 19.05ms
[D 13:56:04.039 NotebookApp] 304 GET /custom/custom.js?v=20181221135525 (127.0.0.1) 1.50ms
[D 13:56:04.045 NotebookApp] 304 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?V=2.7.5 (127.0.0.1) 1.04ms
[D 13:56:04.060 NotebookApp] 304 GET /nbextensions/jupyter-js-widgets/extension.js?v=20181221135525 (127.0.0.1) 1.00ms
{12712} [D 13:56:04.298 NotebookApp] 201 POST /api/sessions (127.0.0.1) 1.01ms
[D 13:56:04.302 NotebookApp] 200 GET /api/contents/93483605a45ec36cd60ed0411dfa5f26/1/workbook.ipynb/checkpoints?_=1545425763802 (127.0.0.1) 2.03ms
[D 13:56:04.366 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?V=2.7.5 (127.0.0.1) 1.00ms
{12712} [D 13:56:21.355 NotebookApp] Initializing websocket connection /api/kernels/97fcfe86-5bb1-4eca-a454-bed534526784/channels
[I 13:56:21.358 NotebookApp] Adapting to protocol v5.1 for kernel 97fcfe86-5bb1-4eca-a454-bed534526784
[D 13:56:21.359 NotebookApp] 101 GET /api/kernels/97fcfe86-5bb1-4eca-a454-bed534526784/channels?session_id=aee117c199a04a5393b689adc47a4ecf (127.0.0.1) 3.51ms
[D 13:56:21.359 NotebookApp] Opening websocket /api/kernels/97fcfe86-5bb1-4eca-a454-bed534526784/channels
[D 13:56:21.359 NotebookApp] Getting buffer for 97fcfe86-5bb1-4eca-a454-bed534526784
[D 13:56:21.359 NotebookApp] Clearing buffer for 97fcfe86-5bb1-4eca-a454-bed534526784
[D 13:56:21.359 NotebookApp] Connecting to: tcp://127.0.0.1:50808
[D 13:56:21.361 NotebookApp] Connecting to: tcp://127.0.0.1:50809
[D 13:56:21.364 NotebookApp] Connecting to: tcp://127.0.0.1:50810```
@kuol We met this issue for the same, do you have any solution on it?
hey! I have depolyed the ’jupyterlab‘ service in my ubuntu cloud server and every time I need a long time to connect kernel as well.
A possible solution I found is here:
https://discourse.jupyter.org/t/lab-startup-really-slow/2856
Just like what he said, some bugs, errors may mess up the json file you need to login, so just add 'reset' after '
Most helpful comment
@kuol We met this issue for the same, do you have any solution on it?