vim /etc/security/limits.conf
# End of file
* soft nproc 65535
* hard nproc 65535
* hard nofile 1000000
* soft nofile 1000000
* soft core unlimited
* soft stack 10240
从参数看没有什么问题,最后搜索了下是由于CentOS 6.5版本新增了限制配置 /etc/security/limits.d/90-nproc.conf ,以保证root用户无限制。此配置会覆盖主配置文件的设定:
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 1024
root soft nproc unlimited
解决办法:删除 /etc/security/limits.d/90-nproc.conf 文件中1024那一行,或者将数字改大
# End of file
* soft nproc 65535
* hard nproc 65535
* hard nofile 1000000
* soft nofile 1000000
* soft core unlimited
* soft stack 10240
从参数看没有什么问题,最后搜索了下是由于CentOS 6.5版本新增了限制配置 /etc/security/limits.d/90-nproc.conf ,以保证root用户无限制。此配置会覆盖主配置文件的设定:
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 1024
root soft nproc unlimited
解决办法:删除 /etc/security/limits.d/90-nproc.conf 文件中1024那一行,或者将数字改大