使用 tidb-operator 部署,pd 部署成功,tikv 一直处于 CrashLoopBackOff 状态
1.查看日志
TiDB集群安装过程中,遇到报错:
the maximum number of open file descriptors is too small, got 65536, expect greater or equal to 82920
或者
fatal: [xxx.xxx.200.205]: FAILED! => {“changed”: false, “msg”: “The default maximum number of open file descriptors is too low 4096, should be 1000000”}
2.原因分析
max open file limitation
设置过小,需要增大配置.
3.处理办法
修改
/usr/lib/systemd/system/docker.service
LimitNOFILE=infinity LimitNPROC=infinity
为
LimitNOFILE=1048576
LimitNPROC=1048576
重启 docker 后, tidb 集群部署起来了.