登录非root用户,报错如下:
[root@test ~]# su - app
su: 无法设置用户ID: 资源暂时不可用
或者用ssh 命令连接服务器之后,如果一段时间不操作,再次进入 Terminal 时会有一段时间没有响应,然后就出现错误提示:
Write failed: Broken pipe
解决办法:
[root@test ~]# vim /etc/security/limits.d/90-nproc.conf
# 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
改为
[root@test ~]# vim /etc/security/limits.d/90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
* soft nproc 65535 //将这个数值由1024改到65535.或者直接删除这一行
root soft nproc unlimited