随笔 - 121  文章 - 0  评论 - 2  阅读 - 69673 

现象:Unhandled exception. 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()

1、分析原因:

在DotNet核心中读取json文件时出错“已达到inotify实例数量的配置用户限制(128)

2、处理方法

cat /proc/sys/fs/inotify/max_user_instances 查看原来的默认128

vim /etc/sysctl.conf 添加如下内容

fs.inotify.max_user_watches = 1638400
fs.inotify.max_user_instances = 1638400

使配置生效 sysctl -p

再次查看 cat /proc/sys/fs/inotify/max_user_instances 变成1638400了

 

posted on   MhaiM  阅读(912)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
历史上的今天:
2022-12-13 ceph pg修复过程
点击右上角即可分享
微信分享提示