機能追加 #607
webサーバulimit変更
ステータス: | 商用リリース | 開始日: | 2015/12/16 | |
---|---|---|---|---|
優先度: | 通常 | 期日: | ||
担当者: | 山本 義治 | 進捗 %: | 0% | |
カテゴリ: | システム全般 | 作業時間の記録: | - | |
対象バージョン: | - |
説明
[root@web1 ~]# ulimit -n
1024
[root@web1 ~]# vi /etc/security/limits.conf
root soft nofile 65536 root hard nofile 65536 * soft nofile 65536 * hard nofile 65536
[root@web1 ~]# su -
[root@web1 ~]# ulimit -n
65536
[root@web1 ~]# cat /proc/`pgrep httpd | head -1`/limits | grep 'open files'
Max open files 1024 1024 files
[root@web1 ~]# killall httpd
[root@web1 ~]# /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test
[root@web1 ~]# /etc/init.d/httpd start
[root@web1 ~]# ps ax | grep httpd
24555 ? Ss 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24556 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24557 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24558 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24559 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24560 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24561 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24562 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24563 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf_test 24579 ? Ss 0:00 /usr/sbin/httpd 24581 ? S 0:00 /usr/sbin/httpd 24582 ? S 0:00 /usr/sbin/httpd 24583 ? S 0:00 /usr/sbin/httpd 24584 ? S 0:00 /usr/sbin/httpd 24585 ? S 0:00 /usr/sbin/httpd 24586 ? S 0:00 /usr/sbin/httpd 24587 ? S 0:00 /usr/sbin/httpd 24588 ? S 0:00 /usr/sbin/httpd 24590 pts/1 S+ 0:00 grep httpd
[root@web1 ~]# cat /proc/24555/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 10485760 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 63859 63859 processes Max open files 65536 65536 files Max locked memory 32768 32768 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 63859 63859 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0
[root@web1 ~]# cat /proc/24579/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 10485760 unlimited bytes Max core file size 0 unlimited bytes Max resident set unlimited unlimited bytes Max processes 63859 63859 processes Max open files 65536 65536 files Max locked memory 32768 32768 bytes Max address space unlimited unlimited bytes Max file locks unlimited unlimited locks Max pending signals 63859 63859 signals Max msgqueue size 819200 819200 bytes Max nice priority 0 0 Max realtime priority 0 0