使用 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 集羣部署起來了.