We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当使用git lfs拉取大量文件代码仓库时,出现了too many open files报错,导致拉取失败
git lfs
too many open files
可以使用ulimit -a来查看当前电脑最大打开文件数量
ulimit -a
-t: cpu time (seconds) unlimited -f: file size (blocks) unlimited -d: data seg size (kbytes) unlimited -s: stack size (kbytes) 8192 -c: core file size (blocks) 0 -v: address space (kbytes) unlimited -l: locked-in-memory size (kbytes) unlimited -u: processes 2784 -n: file descriptors 256
可以看到-n: file descriptors 256,默认最大文件数量非常小
-n: file descriptors 256
使用ulimit -n 1024来将最大文件数量扩大
ulimit -n 1024
如果提示权限不足,则需要在命令前加上sudo
sudo
如果ulimit -n xxxx中xxx过大的话,会出现ulimit: open files: cannot modify limit: Invalid argument错误
ulimit -n xxxx
xxx
ulimit: open files: cannot modify limit: Invalid argument
这时需要使用如下命令来将其上限扩大:
sysctl -w kern.maxfiles=1024000 sysctl -w kern.maxfilesperproc=1024000 ulimit -n 1024000
设置完毕后问题得到解决
The text was updated successfully, but these errors were encountered:
No branches or pull requests
设置最大文件打开数量
问题描述
当使用
git lfs
拉取大量文件代码仓库时,出现了too many open files
报错,导致拉取失败解决方法
可以使用
ulimit -a
来查看当前电脑最大打开文件数量可以看到
-n: file descriptors 256
,默认最大文件数量非常小使用
ulimit -n 1024
来将最大文件数量扩大如果提示权限不足,则需要在命令前加上
sudo
如果
ulimit -n xxxx
中xxx
过大的话,会出现ulimit: open files: cannot modify limit: Invalid argument
错误这时需要使用如下命令来将其上限扩大:
设置完毕后问题得到解决
The text was updated successfully, but these errors were encountered: