Linux 进程报 too many open files 问题处理

原创
2021/06/19 10:50
阅读数 111

使用supervisor启动的进程,报 too many open files

通过命令:

cat /proc/xxx_pid/limits
# 如 cat /proc/10086/limits

查看到的soft limit只有1024.

然后在supervisor管控下的程序配置文件下添加minfdsminprocs,重启不生效:

[program:helloworld]
command=helloworld
minfds=65535
minprocs=65535
...

正确的添加方式应该是直接在 supervisor的配置文件中添加:

...
[supervisord]
minfds=65535
minprocs=65535
...

然后重启supervisor

sudo service supervisor restart
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部