当前位置: 首页 > news >正文

configured user limit (128) on the number of inotify instances has been reached

问题:netcore 站点无法启动

ERROR System.IO.IOException: 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. 
 System.IO.IOException: 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.
   at System.IO.FileSystemWatcher.StartRaisingEvents()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.TryEnableFileSystemWatcher()
   at Microsoft.Extensions.FileProviders.Physical.PhysicalFilesWatcher.CreateFileChangeToken(String filter)
   at Microsoft.Extensions.Primitives.ChangeToken.ChangeTokenRegistration`1..ctor(Func`1 changeTokenProducer, Action`1 changeTokenConsumer, TState state)
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider..ctor(FileConfigurationSource source)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationSource.Build(IConfigurationBuilder builder)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()

解决办法:

cat /proc/sys/fs/inotify/max_user_instances
ulimit -n
sudo find /proc/*/fd -lname 'anon_inode:inotify' 2>/dev/null | wc -l
cat /proc/sys/fs/file-nr
sudo sysctl fs.inotify.max_user_instances=512
nano /etc/sysctl.d/99-inotify.conf
=========================================
fs.inotify.max_user_instances = 512
=========================================
sudo sysctl -p /etc/sysctl.d/99-inotify.conf

 

相关文章:

  • 常考计算机操作系统面试习题(三上)
  • 项目代码的构建
  • 【QA】单件模式在Qt中有哪些应用?
  • isaacgymEnvs 的yaml文件dt设置
  • 【AI学习笔记】Coze平台实现将Excel文档批量导入数据库全过程
  • 多源数据融合处理方法综述
  • 机器学习——KNN超参数
  • 第十五章:模板参数推导_《C++ Templates》notes
  • L2-【英音】地道语音语调--连读
  • 一条sql语句在mysql中的执行流程(Mysql基础架构)
  • 【Unity3D】摄像机适配场景以及Canvas适配
  • 使用LangChain开发智能问答系统
  • c#难点整理
  • 【模板】计算几何入门
  • Vue 表单输入绑定,双向绑定
  • 基于 intellij-platform-plugin-template 开发IDEA插件注意事项
  • form 表单内容序列化成一个字符串
  • 大模型架构记录2 【综述-相关代码】
  • 数据服务赋能数据治理:从“One Service”到QuickAPI的演进
  • redis操作
  • 包揽金银!王宗源、郑九源夺得跳水世界杯总决赛男子3米板冠亚军
  • 旅游特种兵们,这个五一“躲进”书吧
  • 上海与世界|黄菊与上海建设中国式全球城市
  • 中国强镇密码丨洪泽湖畔的蒋坝,如何打破古镇刻板印象
  • 癌症来临前,可能伪装成这几种常见病,千万别大意
  • 影子调查丨危房之下,百余住户搬离梦嘉商贸楼