ubuntu – limits.conf设置不“坚持”

试图在高负载Web服务器上获得相当于ulimit -n 20000的功能,但是ubuntu hardy上的/etc/security/limits.conf似乎并不坚持.

这是我在配置文件中设置的内容.

root             soft    nofile         20000
root             hard    nofile         20000
www-data             soft    nofile         20000
www-data             hard    nofile         20000

我也试过了

*             soft    nofile         20000
*             hard    nofile         20000

重新启动后,当我在root上运行ulimit -n,或者www-data或我的普通用户时,我仍然看到认的1024.

您可能必须从/etc/pam.d(cron,su,sudo,sshd,login)下的不同文件中取消注释pam_limits.so
session    required   pam_limits.so

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...