TeaWeb/build

v0.1.5版本too many open files

Closed this issue · 1 comments

你安装的TeaWeb版本:v0.1.5

你的操作系统:centos7

你的问题简介:管理页面宕机,网站无法正常打卡

问题详细描述:页面打开后显示
open /opt/teaweb-v0.1.5/web/views/@default/dashboard/index.html: too many open files

解决方式是增加在进程启动时增加了ulimit

centos7,修改相关参数,不清楚直接在/etc/init.d/teaweb 中修改ulimit -n 设置是否有效。
vi /etc/systemd/system.conf
DefaultLimitNOFILE=1024000 #这里需要修改
DefaultLimitNPROC=1024000 #这里也需要修改

重启后,查看ulimit
[yl@TeaWeb ~]$ ps -aux |grep teaweb
root 10663 2.3 2.6 259764 108208 ? Sl 09:08 2:39 /opt/teaweb/bin/teaweb
root 10677 0.1 0.4 119468 18328 ? Sl 09:08 0:09 /opt/teaweb-v0.1.5.1/plugins/agent.tea
yl 10940 0.0 0.0 112708 976 pts/0 S+ 11:01 0:00 grep --color=auto teaweb
[yl@TeaWeb ~]$ cat /proc/10663/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 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 1024000 1024000 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 15708 15708 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

没有修改ulimit,ulimit 是1024 或者4096

iwind commented

新版本v0.1.6已修复