找回密码
 立即注册

QQ登录

只需一步,快速开始

Joe.xu 讲师达人认证 悬赏达人认证 活字格认证
超级版主   /  发表于:2022-11-17 17:43  /   查看:1425  /  回复:0
本帖最后由 Joe.xu 于 2022-11-17 17:45 编辑

这种场面,大家应该都不少见吧,只要服务器没说不行,发布多少个应用都行
image.png88280333.png

那大家有没有在成功发布应用之后,发现无法访问呢
image.png213843077.png


上图日志对应的报错是这样的
Assembly: ForguncyServerConsole, Version=8.0.6.0, Culture=neutral, PublicKeyToken=967100671921c115 -----------{
  "ClassName": "System.IO.IOException",
  "Message": "The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached.",
  "Data": null,
  "InnerException": null,
  "HelpURL": null,
  "StackTraceString": "   at System.IO.FileSystemWatcher.StartRaisingEvents()

找大佬了解之后才知道,这个是因为linux inotify 最大实例默认限制为128, 活字格用FileWatcher 监听了一些配置文件的变更,当应用发布的越来越多的时候,
总的监控的数量大于了128 所以出了这个问题。
不了解linux inotify可以看下网上的资料:
Linux Inotify详解_吉吉爱马仕的博客-CSDN博客
Linux下inotify机制简介 - 走看看 (zoukankan.com)

解决方案也很简单,在服务管理器所在的Linux机器上执行如下命令即可
echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p



0 个回复

您需要登录后才可以回帖 登录 | 立即注册
返回顶部