您的位置:首页 > 大数据 > 人工智能

su: cannot set user id: Resource temporarily unavailable(资源不可用)

2018-04-02 10:18 603 查看
--问题,无法登录用户

# su - www

su: cannot set user id: Resource temporarily unavailable

--查看当前系统该用户进程数,发现进程数很多

# ps aux|grep www | wc -l

2180

--检查系统配置的用户资源分配情况,发现www账号文件进程数并没有配置,而是使用系统默认设置的值,

用户进程数noproc上限是由/etc/security/limits.d/90-noproc.conf配置文件限制。

# cat /etc/security/limits.conf

# End of file

@users soft nofile 100001

@users hard nofile 100002

@root  soft nofile 200001

@root  hard nofile 200002

mysql   soft    noproc 65535

mysql   hard    noproc 65535

--检查系统文件进程数限制

# cat  /etc/security/limits.d/90-nproc.conf 

*          soft    nproc     1024

root       soft    nproc     unlimited

# vi /etc/security/limits.d/90-nproc.conf--问题解决
方法1:直接修改*开头的用户进程数

*          soft    nproc     1024

方法2:增加用户,建议用此方法

www soft nproc 4096

-------------------------------------------------------------------------------------------------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: