博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
openstack Too many open files错误
阅读量:5115 次
发布时间:2019-06-13

本文共 2494 字,大约阅读时间需要 8 分钟。

oopenstack突然web页面无法打开,页面报500错误,查看httpd日志报如下错误

[Fri Feb 01 13:47:36.120854 2019] [:error] [pid 28948] [remote 192.168.14.83:680] IOError: [Errno 24] Too many open files: '/usr/share/openstack-dashboard/openstack_dashboard/themes/default/templates/500.html'[Fri Feb 01 13:52:21.837032 2019] [mpm_prefork:notice] [pid 5454] AH00170: caught SIGWINCH, shutting down gracefully[Fri Feb 01 13:54:50.565154 2019] [suexec:notice] [pid 5490] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)[Fri Feb 01 13:54:50.579447 2019] [auth_digest:notice] [pid 5490] AH01757: generating secret for digest authentication ...[Fri Feb 01 13:54:50.579837 2019] [lbmethod_heartbeat:notice] [pid 5490] AH02282: No slotmem from mod_heartmonitor[Fri Feb 01 13:54:50.590593 2019] [mpm_prefork:notice] [pid 5490] AH00163: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations[Fri Feb 01 13:54:50.590627 2019] [core:notice] [pid 5490] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'[Fri Feb 01 13:56:15.154790 2019] [:error] [pid 5495] WARNING:root:Use of this 'djano.wsgi' file has been deprecated since the Rocky release in favor of 'wsgi.py' in the 'openstack_dashboard' module. This file is a legacy naming from before Django 1.4 and an importable 'wsgi.py' is now the default. This file will be removed in the T release cycle.

 

突然想起在安装的时候忘记修改操作系统打开的文件数;登录到控制节点执行

[root@ipr-controller httpd]# ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedscheduling priority             (-e) 0file size               (blocks, -f) unlimitedpending signals                 (-i) 62931max locked memory       (kbytes, -l) 64max memory size         (kbytes, -m) unlimitedopen files                      (-n) 1024pipe size            (512 bytes, -p) 8POSIX message queues     (bytes, -q) 819200real-time priority              (-r) 0stack size              (kbytes, -s) 8192cpu time               (seconds, -t) unlimitedmax user processes              (-u) 62931virtual memory          (kbytes, -v) unlimitedfile locks                      (-x) unlimited[root@ipr-controller httpd]# [root@ipr-controller httpd]# [root@ipr-controller httpd]# ulimit -n1024

查看当前打开文件数,明显超过了1024

[root@ipr-controller httpd]# lsof | wc -l  98026

 

修改默认值

vim /etc/security/limits.conf  在最后加入如下信息:

*               soft    nofile            1024000*               hard    nofile            1024000

 

 *表示所有用户

 

修改后重启服务器,配置生效

 

转载于:https://www.cnblogs.com/heruiguo/p/10345640.html

你可能感兴趣的文章
可选参数的函数还可以这样设计!
查看>>
Java语言概述
查看>>
关于BOM知识的整理
查看>>
使用word发布博客
查看>>
面向对象的小demo
查看>>
微服务之初了解(一)
查看>>
GDOI DAY1游记
查看>>
收集WebDriver的执行命令和参数信息
查看>>
数据结构与算法(三)-线性表之静态链表
查看>>
mac下的mysql报错:ERROR 1045(28000)和ERROR 2002 (HY000)的解决办法
查看>>
MyBaits动态sql语句
查看>>
HDU4405(期望DP)
查看>>
拉格朗日乘子法 那些年学过的高数
查看>>
vs code 的便捷使用
查看>>
Spring MVC @ResponseBody返回中文字符串乱码问题
查看>>
用户空间与内核空间,进程上下文与中断上下文[总结]
查看>>
JS 中的跨域请求
查看>>
JAVA开发环境搭建
查看>>
mysql基础语句
查看>>
Oracle中的rownum不能使用大于>的问题
查看>>