通常都用 ulimit -a 的命令查看服务器当前参数配置
[@zw_68_67 ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1032144
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks
常见修改服务配置,open files 和 max user processes等参数
修改位置:vim /etc/security/limits.conf
* soft nofile 102400
* hard nofile 102400
soft nproc 102400
保存文件后,重启服务器,重启后设置才能生效