====== Linux limits встановлення лімітів на відкриті файли ====== ===== Проблема ===== Якась програма падає при старті з помилкою **"Too many open files"** ===== Налаштування ===== ==== $HOME/.config/systemd/user.conf.d/limits.conf ==== [Manager] DefaultLimitNOFILE=524288 це встановлює одночасно і софт, і хард ліміт ==== /etc/systemd/system.conf.d/limits.conf ==== [Manager] DefaultLimitNOFILE=524288 ==== /etc/security/limits.conf ==== * soft nofile 524288 * hard nofile 524288 root soft nofile 524288 root hard nofile 524288 після цього треба перезавантажити комп'ютер. ===== Перевірка ===== ulimit -n ulimit -Hn systemctl --user show | grep -i limitnofile ===== Додатково ===== Іноді справа зовсім в інших лімітах: ==== /etc/sysctl.d/wezterm.conf ==== fs.inotify.max_user_instances=1024