Jupyter Notebook [Errno 24]打开的文件太多

时间:2020-03-08 23:40:44

标签: jupyter-notebook

打开大约六个文件后,我开始遇到以下错误:

Traceback (most recent call last):
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 547, in write_connection_file
  File "/Users/yifanwu/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 170, in write_connection_file
  File "/Users/yifanwu/anaconda3/lib/python3.7/socket.py", line 151, in __init__
OSError: [Errno 24] Too many open files

我在线上看到了一些有关可能原因的线索,并尝试了诸如ulimit -n 5120之类的事情(我什至不确定是否与之相关)。我还看到了一些有关将~/.local/share/jupyter设置为user而不是root的帖子,但是我什至没有该文件,我怀疑答案不再适用。

我被困在下一步的工作上-我什至怎么知道正在打开哪些文件?

谢谢!

0 个答案:

没有答案