Jupyter OSError:[Errno 122] 超出磁盘配额:

Jupyter OSError:[Errno 122] 超出磁盘配额:

我在服务器上运行 jupyter notebook 并使用 ssh 隧道访问它。尝试启动 jupyter 时出现内核错误。

Traceback (most recent call last):
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute
    result = yield result
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
    type=mtype))
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 160, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/jupyter_client/manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/jupyter_client/connect.py", line 472, in write_connection_file
    kernel_name=self.kernel_name
  File "/home/user/.conda/envs/bakbio/lib/python3.6/site-packages/jupyter_client/connect.py", line 137, in write_connection_file
    with open(fname, 'w') as f:
OSError: [Errno 122] Disk quota exceeded: '/home/user/.local/share/jupyter/runtime/kernel-7fc2dae5-da71-4ce3-889f-de615073dd51.json'

错误信息似乎很明显,但我不知道如何解决它。我尝试从我的帐户中删除一些大文件并重新启动 jupyter,但仍然出现同样的错误。此外,在尝试一些需要大量内存的计算后也会发生这种情况。计算生成的文件(尚未完成)只有 2.8G,但我怀疑某些地方有一些缓存文件。

配置:Linux 版本 3.10.0-514.6.1.el7.x86_64 ([电子邮件保护]) (gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) conda 4.5.11 jupyter notebook 5.7.2

答案1

问题是分配给 Home 的磁盘空间配额已超出。检查方法如下:

du --si -s $HOME

结果,Jupyter 无法写入“/home/user/.local/share/jupyter/runtime/kernel-7fc2dae5-da71-4ce3-889f-de615073dd51.json”,必须清理主目录。

相关内容