背景:

Elasticsearch启动报错:

ERROR:  bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决方案:

一、临时修改:

vim /etc/profile

添加 ulimit -SHn 1048576

然后用普通用户执行 source /etc/profile

二、永久修改:

vim /etc/sysctl.conf

添加:fs.file-max = 1048576

执行 sysctl -p

vim /etc/security/limits.conf

添加:

* hard nofile 1048576
* soft nofile 1048576
root hard nofile 1048576
root soft nofile 1048576

再执行:
sed -i '/DefaultLimitNOFILE/c DefaultLimitNOFILE=1048576' /etc/systemd/*.conf
systemctl daemon-reexec

然后注销退出重新登录(注销如果不生效就重启一下)
验证:ulimit -Hn

最新文章

  1. 用angular怎么缓存父页面数据
  2. leetcode-javascript
  3. HTML 学习笔记 CSS(选择器2)
  4. hihocoder 1138 Islands Travel dijkstra+heap 难度:2
  5. java中四种引用类型
  6. C#将对象转换成JSON字符串,Newtonsoft.Json (JSON.NET)
  7. 利用OpenXml生成Word2007文档
  8. setSingleChoiceItems和setPositiveButton两者触发时期
  9. V4L2驱动的移植与应用(二)
  10. 学习Mathematica
  11. .Net NPOI 上传excel文件、提交后台获取excel里的数据
  12. IDEA 配置datasource,提升编码效率,让你在 Mapper.xml 中编写sql可以飞起来~
  13. jquery操作checkBox 一次取消选中后不能再选中
  14. Python基础知识摘要
  15. .NET控件集ComponentOne 2018V3发布:新增图表动画及迷你图
  16. vue mapbox 地图 demo
  17. 2018.12.31 bzoj3992: [SDOI2015]序列统计(生成函数+ntt+快速幂)
  18. Fedora16的双显卡切换问题
  19. 可扩展的Web系统和分布式系统(Scalable Web Architecture and Distributed Systems)
  20. 20165310_JavaExp1

热门文章

  1. 将含两列的csv文件生成二维矩阵
  2. MySQL Delete 表数据后,磁盘空间并未释放,为什么?
  3. 微信小程序笔记_02
  4. Idea报错:Command line is too long.
  5. wand,week and 算法
  6. centos7 双网卡同网段双网关配置
  7. ubuntu的vsftpd
  8. 微信防红页面JS代码
  9. redis之缓存穿透、缓存击穿、缓存雪崩
  10. Jquery_002