Upgrading TiDB to version 6.1.1 causes rapid memory consumption; 5 servers with 128GB of memory are frequently exhausted, leading to automatic TiKV restarts. How to resolve this issue?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIDB升级到6.1.1版本,内存消耗很快,5台128G内存,经常消耗完了,TIKV就自动重启了,如何解决问题?

| username: Hacker_g3b9VBO9

| username: tidb狂热爱好者 | Original post link

Do you want to know the reason? It’s slow SQL.

| username: Hacker_g3b9VBO9 | Original post link

After upgrading to 6.1.1, the remaining space of 5.2.1, which was more than 10GB, and some with more than 20GB, suddenly decreased significantly and the system frequently restarts.

| username: jansu-dev | Original post link

  1. Check /var/log/message to confirm if TiDB restarted due to OOM.
  2. If so, analyze the tidb.log and slow SQL around the OOM time point.
  3. Currently, the information can only be judged to this extent. More detailed information requires further conclusions combined with panel analysis.

This is the general idea. Usually, OOM is caused by large SQL or execution plan deviation, and there are also a few bugs caused by internal mechanisms.

| username: Billmay表妹 | Original post link

In versions after 6.2, you can use set @@global.tidb_enable_paging = 1 to solve this issue.
In older versions, you can try set @@session.tidb_enable_chunk_rpc = 0.

| username: 海石花47 | Original post link

Wasn’t this bug fixed as early as version 5.x?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.