Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb慢日志 slow log 可以配置份数和大小吗
【TiDB Usage Environment】Production Environment
【TiDB Version】6.5.1
【Reproduction Path】Operations performed that led to the issue
【Encountered Issue: Issue Phenomenon and Impact】
Can the number and size of TiDB slow logs be configured?
【Resource Configuration】
Try limiting it with this configuration
This seems to only be effective for TiDB’s own logs, not for slow logs.
Currently, it can only be handled through shell scripts… 
There are more logs for TiFlash. Do these also need to be cleaned manually?
max-days applies to both tidb.log and slow logs simultaneously.
What about the tiflash logs?
Try this, it looks like you have configured it, but it doesn’t seem to be working?
Yes, I configured it but it didn’t work. There are still a bunch of tiflash_tikv logs.
This is the configuration for tiflash_learner. I didn’t see any configuration for the number of logs. You can make a suggestion, but the official recommendation is not to modify the content below this.
In earlier versions, it seems that these two parameters could be set.
diag/tiflash.json at 83bcac492f1426212f8b550ed019d0e7c068b5dc · pingcap/diag (github.com)
If you have a test environment, you can verify it. Do not touch the production environment.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.