Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: explorer 插件启动失败 EMFILE: too many open files, watch '/koishi' #328

Closed
TszcWhut opened this issue May 28, 2024 · 11 comments
Closed
Labels

Comments

@TszcWhut
Copy link

Describe the bug

见下图,会导致错误日志大量增加

Steps to reproduce

在Docker容器中部署的,清除过浏览器的localStorage和cookies等,尝试过删除容器重新部署 均无法解决此问题

Expected behavior

无error报错

Screenshots

No response

Versions

  • OS:
  • Platform:
  • Node version:
  • Koishi version:

Additional context

image

@TszcWhut TszcWhut added the bug Something isn't working label May 28, 2024
@ilharp
Copy link
Member

ilharp commented May 28, 2024

你是否手动启用、添加或移动了 develop 分组下的任何插件,例如 hmr 插件?

@TszcWhut
Copy link
Author

你是否手动启用、添加或移动了 develop 分组下的任何插件,例如 hmr 插件?

没有 我只在webui上操作过,东西全部都运行在docker容器中,我也尝试删掉旧容器后重新部署映像依然会有一样的报错

@ilharp
Copy link
Member

ilharp commented May 28, 2024

我只在webui上操作过

是的,我想问的就是,你在 webui 中操作的过程中是否不小心创建、移动、启用了与开发有关的插件。develop 分组内的插件均属于开发相关插件

@TszcWhut
Copy link
Author

是的,我想问的就是,你在 webui 中操作的过程中是否不小心创建、移动、启用了与开发有关的插件。develop 分组内的插件均属于开发相关插件

应该是没有的,我重新部署了容器后零插件的情况下也是有该报错,如果现在额外装了的插件也只有适配器 adp-onebot 和 一个 image-search 其他插件都是自带的

@TszcWhut
Copy link
Author

TszcWhut commented May 30, 2024

偶尔再安装别的插件后koishi会崩溃无限重启
image
image

@TszcWhut
Copy link
Author

TszcWhut commented May 30, 2024

完整日志:
2024-05-30 17:47:04 [I] app Koishi/4.17.7
2024-05-30 17:47:04 [I] loader apply plugin group:entry
2024-05-30 17:47:04 [I] loader apply plugin group:server
2024-05-30 17:47:04 [I] loader apply plugin server:6uwbqe
2024-05-30 17:47:04 [I] loader apply plugin group:basic
2024-05-30 17:47:04 [I] loader apply plugin commands:190wjl
2024-05-30 17:47:04 [I] loader apply plugin help:7332nx
2024-05-30 17:47:04 [I] loader apply plugin http:cqvyue
2024-05-30 17:47:04 [I] loader apply plugin locales:e0fvsl
2024-05-30 17:47:04 [I] loader apply plugin proxy-agent:a3mcqz
2024-05-30 17:47:04 [I] loader apply plugin rate-limit:z8pivr
2024-05-30 17:47:04 [I] loader apply plugin telemetry:j07eyv
2024-05-30 17:47:04 [I] loader apply plugin group:console
2024-05-30 17:47:04 [I] loader apply plugin actions:q74oyf
2024-05-30 17:47:04 [I] loader apply plugin analytics:pg2url
2024-05-30 17:47:04 [I] loader apply plugin config:w1xipi
2024-05-30 17:47:04 [I] loader apply plugin console:jz4akv
2024-05-30 17:47:04 [I] loader apply plugin dataview:3slsdf
2024-05-30 17:47:04 [I] loader apply plugin explorer:3ya1d1
2024-05-30 17:47:04 [I] loader apply plugin logger:rjnxdm
2024-05-30 17:47:04 [I] loader apply plugin insight:ol1y73
2024-05-30 17:47:04 [I] loader apply plugin market:04ly82
2024-05-30 17:47:04 [I] loader apply plugin notifier:64w46s
2024-05-30 17:47:04 [I] loader apply plugin oobe:93w4ru
2024-05-30 17:47:04 [I] loader apply plugin sandbox:l8xo4h
2024-05-30 17:47:04 [I] loader apply plugin status:2a3l5w
2024-05-30 17:47:04 [I] loader apply plugin theme-vanilla:6st3l4
2024-05-30 17:47:04 [I] loader apply plugin group:storage
2024-05-30 17:47:04 [I] loader apply plugin database-sqlite:1ckeop
2024-05-30 17:47:04 [I] loader apply plugin assets-local:4p34lc
2024-05-30 17:47:04 [I] loader apply plugin group:adapter
2024-05-30 17:47:04 [I] loader apply plugin adapter-onebot:1058ya
2024-05-30 17:47:04 [I] loader apply plugin image-search:fqfz8i
2024-05-30 17:47:04 [I] assets missing config "selfUrl", fallback to "file:" scheme
2024-05-30 17:47:04 [I] server server listening at http://0.0.0.0:5140
2024-05-30 17:47:04 [I] console webui is available at http://127.0.0.1:5140
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
                            at async /koishi/node_modules/chokidar/index.js:451:21
                            at async Promise.all (index 0)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/README.md'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/koishi.yml'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/package.json'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/yarn.lock'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/locales'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/koishi.db'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/assets'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/locales'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/logs'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleDir (/koishi/node_modules/chokidar/lib/nodefs-handler.js:567:19)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:617:16)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/logs/2024-05-30-1.log'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)
2024-05-30 17:47:04 [W] app Error: EMFILE: too many open files, watch '/koishi/data/logs/2024-05-30-2.log'
                            at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
                            at Object.watch (node:fs:2469:36)
                            at createFsWatchInstance (/koishi/node_modules/chokidar/lib/nodefs-handler.js:119:15)
                            at setFsWatchListener (/koishi/node_modules/chokidar/lib/nodefs-handler.js:166:15)
                            at NodeFsHandler._watchWithNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:331:14)
                            at NodeFsHandler._handleFile (/koishi/node_modules/chokidar/lib/nodefs-handler.js:395:23)
                            at NodeFsHandler._addToNodeFs (/koishi/node_modules/chokidar/lib/nodefs-handler.js:637:21)

@shigma
Copy link
Member

shigma commented May 30, 2024

感谢你的反馈,不过这些日志的报错堆栈太短,看不出是哪个插件的调用。能麻烦你把 yarn.lock 发出来吗?

@TszcWhut
Copy link
Author

感谢你的反馈,不过这些日志的报错堆栈太短,看不出是哪个插件的调用。能麻烦你把 yarn.lock 发出来吗?

yarn.zip
实际上我没有装别的插件也会出现报错,刚在容器上部署好就会出现上述警告报错,昨天更新了也是 使用的koishijs/koishi:latest

@shigma
Copy link
Member

shigma commented May 31, 2024

疑似是 @koishijs/plugin-explorer 这个插件在监听。请关闭这个插件,并检查问题是否复现。

@TszcWhut
Copy link
Author

疑似是 @koishijs/plugin-explorer 这个插件在监听。请关闭这个插件,并检查问题是否复现。

解决了 但是这个explorer是webui自带且自启动的插件

@shigma
Copy link
Member

shigma commented May 31, 2024

我 reopen 改个名字 transfer 到插件仓库吧。

@shigma shigma reopened this May 31, 2024
@shigma shigma changed the title Bug: 错误信息 app Error: EMFILE: too many open files, watch '/koishi' Bug: explorer 插件启动失败 EMFILE: too many open files, watch '/koishi' May 31, 2024
@shigma shigma transferred this issue from koishijs/koishi May 31, 2024
@shigma shigma closed this as completed in 232567c Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants