使用命令ulimit -a查看,其中open files就是最大连接数,一般情况下web服务器最大连接数的设置不能超过它

centos下查看最大Socket连接数

 修改最大连接数:vi /etc/security/limits.conf 文件末尾添加

*soft nofile 32768
*hard nofile 32768

centos下查看最大Socket连接数

添加后保存

修改/etc/pam.d/login文件,在文件中添加如下行:
session required /lib/security/pam_limits.so

重启服务器

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-02-06
  • 2021-11-19
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2021-05-21
  • 2021-11-26
相关资源
相似解决方案