非root用户执行java进程报错:fork: retry:资源暂时不可用

来源:互联网 发布:产品主数据 编辑:程序博客网 时间:2024/05/19 00:55
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那一行,或者将数字改大
阅读全文
0 0
原创粉丝点击