solr|取消启动solr时提示的file limit和Max Processes Limit 的限制

在linux系统中安装solr后,启动时提示两个警告,
*** [WARN] *** Your open file limit is currently 1024.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] ***Your Max Processes Limit is currently 4096.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh

如何取消呢
1。查看系统所有限制
[zhw@ecs-solr bin]$ 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) 127866
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) 8192
cpu time(seconds, -t) unlimited
max user processes(-u) 4096
virtual memory(kbytes, -v) unlimited
file locks(-x) unlimited
2。修改打开文件数限制
。 以root身份修改文件/etc/security/limits.conf文件,在最后添加下面两行
* soft nofile 65535
* hard nofile 65535
这个修改之后,重新登录生效。
3。修改进程限制
以root身份修改文件/etc/security/limits.d/20-nproc.conf 文件(centOS6为90-nproc.conf),文件内容为
*softnproc4096
rootsoftnprocunlimited
将4090改成65535
修改后重新登录生效。




【solr|取消启动solr时提示的file limit和Max Processes Limit 的限制】


    推荐阅读