pingcap / pingcap/tidb

TiDB oom when analyzing table and the cpu load is high

Open
#36,909 1 comment 0 reactions 1 assignee Claimed by @chrysan View on GitHub
severity/moderate sig/planner type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)
1. deploy a cluster, tidb using 8C 16G
2. set the analyze mem quota and analyze version
```sql
set global tidb_mem_quota_analyze = 5368709120; -- (5G)
set global tidb_analyze_version = 2;
```
3. create a table has about 160 columns, and init 5000w data
4. run workload update and insert the data for 12h

### 2. What did you expect to see? (Required)
the tidb can work stably

### 3. What did you see instead (Required)
tidb will oom and restart while doing analyze
![image](https://user-images.githubusercontent.com/5151781/182987598-1c5a8646-e473-4b2f-824b-96740296c42d.png)

### 4. What is your TiDB version? (Required)
v6.2.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.