-
Notifications
You must be signed in to change notification settings - Fork 5k
[Bug][worker] Too many open files #3618
Copy link
Copy link
Closed
Description
*For better global communication, please give priority to using English description, thx! *
Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
版本是 [1.3.1-release]
Steps to reproduce the behavior, for example:
- 在3台物理机部署了ds系统
- 在一个项目中创建了1万个流,每个流1个shell任务,内容为简单的echo "xxx",流调度的频率为每小时
- 当系统运行一段时间之后,大量的任务失败,抛出的错误为
- See error

我用lsof 查看了下,发现ds占用的文件句柄到达了几十万,每个节点都占用了几十万,而我已经把对应的系统用户的/etc/security/limit.conf中的配置调整到了655350,但是依然爆炸了。
经过我的排查,发现是ds的日志查看机制引起的,ds中为了方便的查看每个任务的日志,将每个任务运行的日志,写到了日志目录下的baseDir/${process_define_id}/${process_instance_id}/${task_id}.log,这样每次运行一个任务,都会生成一个日志文件,随着系统的运行,日志文件越来越多,占用了文件句柄数越来越多,触发了上面的异常,我觉得这个是日志的机制问题,在我看来,
要么去掉log,直接用文件读写的方式来实现输出,这种情况下改动较小,但是依然会导致服务器上的小文件数量过多的问题
要么将日志的内容写到数据库或其他便于检索的存储引擎中,不要使用本地文件的方式来搞。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working