Linux 系统永久设置ulimit

Linux 系统出现 Too many open files 类错误的解决方法。

Linux 系统永久设置ulimit

查看当前限制,实行:

1
ulimit -n

默认是 1024,如果不是root,可能不能修改超过 1024

临时修改,实行:

1
ulimit -n 524288

512 * 1024

永久修改

编辑 /etc/security/limits.conf 文件, 加入如下行:

1
2
3
# /etc/security/limits.conf
root         hard    nofile      524288
root         soft    nofile      524288

第一列的 root 表示 root 用户, 你可以填 *. 然后保存退出, 重新登录服务器,再查看,已是自己修改的数据

本文网址: https://pylist.com/topic/146.html 转摘请注明来源

Suggested Topics

go struct 设置默认值

在 Golang 中,我们经常碰到要设置一个结构体的默认值,但 Golang 没有较好的方式实现这功能,需要通过其它方式实现,其效果也比较优雅。...

10分钟顺利升级 debian 系统 10 -> 11

debian 是小巧、方便使用的服务器系统,用命令行可以很方便升级。这里记录一下过程,是从 10/buster 升到 11/bullseye,其它版本也类似。...

现在最适合Linux的笔记本电脑是什么?

因为苹果公司最近停止支持在2012年15英寸retina MacBook Pro上运行的OS X的最后一个版本。如果你错过了,这个设计是受史蒂夫·乔布斯影响的最后一款,绝对是史诗级的,近十年来都无法触及,直到M1 MacBook问世才真正被超越。...

在 Ubuntu 或其它 GNU/Linux 系统下安装 Debian

家有老电脑不用就折腾不止,前段时间曾折腾一台老电脑,2007年上市,只支持 i386 系统,不支持U盘启动,在 winxp 系统下装了 Ubuntu,现在突发奇想,要在 Ubuntu 上安装 Debian。...

Leave a Comment