统信UOS问题
- 系统版本 (cat /proc/version)
Linux version 4.19.0-arm64-desktop (deepin@deepin-PC) (gcc version 8.3.0 (Debian 8.3.0-6)) #1825 SMP Thu Sep 3 15:15:48 CST 2020 - docker 启动容器报错
在统信UOS上部署.net core 程序,启动容器时出现错误: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.
解决方案
- 方案一
sudo vim /etc/sysctl.conf
增加下面内容(环境变量)
sudo sysctl -pfs.inotify.max_user_watches = 1638400 fs.inotify.max_user_instances = 1638400
- 方案二
增加临时环境变量 export DOTNET_USE_POLLING_FILE_WATCHER=true - 方案三(推荐)
echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p