「Too many open files」は恥ずかしいって話 IT by NHM - 2021-04-012021-04-01 要するに想定していた以上にファイル開かれちゃったなんですよね。。。 Too many open files かと言って、既存ユーザのセッションで確認しても意味なし。 ulimit -n というわけで実際に起動しているプロセスを確認したほうが良いって話。 ps -ef | grep systemd root 1 0 0 Mar01 ? 00:00:51 /usr/lib/systemd/systemd --switched-root --system --deserialize 21 root 363 1 0 Mar01 ? 00:00:25 /usr/lib/systemd/systemd-journald root 396 1 0 Mar01 ? 00:00:00 /usr/lib/systemd/systemd-udevd dbus 545 1 0 Mar01 ? 00:00:29 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 551 1 0 Mar01 ? 00:00:15 /usr/lib/systemd/systemd-logind root 14121 13808 0 01:36 pts/0 00:00:00 grep --color=auto systemd プロセスIDを取得して実際に確かめる。 cat /proc/363/limits Limit Soft Limit Hard Limit Units Max cpu time unlimited unlimited seconds Max file size unlimited unlimited bytes Max data size unlimited unlimited bytes Max stack size 8388608 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 15726 15726 processes Max open files 16384 16384 files Max locked memory 65536 65536 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 15726 15726 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0 Max realtime timeout unlimited unlimited us ついでにdeamonに設定するなら。 [Service] LimitNOFILE=8192 systemctl daemon-reload systemctl restart サービス あとついでに設定ファイル見たいなら systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Share on Facebook Share Share on TwitterTweet Share on Pinterest Share Share on LinkedIn Share Share on Digg Share No tags for this post.