Too many files
Docker 部署openstack  pike版本,控制器ovs报错,too many files.
先安装重要工具lsof。
yum install lsof
[root@node2 etc]# lsof|wc -l

lsof: no pwd entry for UID 48
2780364
 lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more
lsof: no pwd entry for UID 48
lsof: no pwd entry for UID 48
lsof: no pwd entry for UID 48
2294223 28030
 137799 25594
  59974 28392
  50081 23404
  41184 24424
  41134 24322
  28369 25373
  13920 22385

root     28030 75.6  0.2 2493716 290592 ?      DLl  2月04   8:45 /usr/sbin/ovs-vswitchd unix:/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=/var/log/kolla/openvswitch/ovs-vswitchd.log
一个进程消耗200多万个句柄,怎么会这么多!

[root@node2 security]# cat  /proc/28030/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             unlimited            unlimited            processes
Max open files            65536                65536                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       384395               384395               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

 docker  stop openvswitch_vswitchd

lsof: no pwd entry for UID 48
lsof: no pwd entry for UID 48
 141105 25594
  62629 28392
  48277 23404
  41184 24424
  41134 24322
  26774 25373
  13600 22385
  13040 22379
   8448 2352

[root@node2 security]# ulimit -n
1024000
[root@node2 security]# ulimit -H -n 10240000
-bash: ulimit: open files: 无法修改 limit 值: 不允许的操作

vi  /etc/profile
ulimit -H -n 10240000

ssh 登录不上服务器了!
hofman   2018-02-05 01:23:20 评论:0   阅读:205   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

2003-2007@copyright