docs-cn
docs-cn copied to clipboard
token-limit 配置项最大值不合理
File: /release-7.5/tidb-configuration-file.md
最大值(64 位平台):18446744073709551615 最大值(32 位平台):4294967295
相关代码: func NewTokenLimiter(count uint) *TokenLimiter { tl := &TokenLimiter{count: count, ch: make(chan *Token, count)} for i := uint(0); i < count; i++ { tl.ch <- &Token{} }
return tl
}
TiDB运行时,会初始化指定长度的 channel,若设置过大,会导致 TiDB OOM 无法启动。建议限制该配置项的最大值
@djshow832 Could you please take a look at this issue? Thanks!
I have filed an issue for TiDB: https://github.com/pingcap/tidb/issues/53312
Currently, we have 2 ways to fix the doc:
- Fix the issue on TiDB and then update the value in docs for branch
dev(I don't think this bugfix needs to be cherry-picked into previous versions) - Recommend the users to set the value according to the memory of the machine and warn them
After discussion, we chose the 1st solution.