Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: Tidb server服务器内存持续增长 内存泄漏
To improve efficiency, please provide the following information. A clear problem description can help resolve the issue faster:
[TiDB Usage Environment]
Production Environment
[Overview] Scenario + Problem Overview
The memory of the TiDB server continues to grow, causing OOM kills.
[Background] Actions Taken
Manually analyzed the memory of the TiDB server.
First analysis date: 2022/10/24
First analysis:
Second analysis:
TiDB server parameter configuration:
memory-usage-alarm-ratio=0.8
mem-quota-query=4294967296 (4G)
oom-action=cancel
Manual analysis original file:
[profiling_2022-10-24_15-13-42.zip|attachment] (6.8 MB)
Second original analysis file:
[profiling_2022-10-25_16-58-59.zip|attachment] (6.9 MB)
[Phenomenon] Business and Database Phenomenon
Database anomaly, direct restart
Recent 7-day TiDB server memory usage
OOM kill
[Problem] Current Issue Encountered
TiDB server OOM kill causing system service anomalies and restarts.
[Business Impact]
Data statistics service data is unavailable.
[TiDB Version]
v5.4.0
[Application Software and Version]
[Attachments] Relevant Logs and Configuration Information
/data/tidb_db/tidb-log]#dmesg |egrep -i -r ‘killed’ /var/log
/var/log/messages-20221002: Oct 1 17:24:48 PD205 systemd: tidb-4000.service: main process exited, code=killed, status=9/KILL
/var/log/messages: Oct 25 15:03:04 PD205 systemd: tidb-4000.service: main process exited, code=killed, status=9/K
Captured memory stack
[profile.zip|attachment] (7.2 MB)