The TiDB server has already limited memory in the configuration file, but it is still full

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

Original topic: tidb server已经在配置文件中限制了内存,但是还是爆满了。

| username: ablewang_xiaobo

【TiDB Usage Environment】Production
【TiDB Version】v5.2.2
【Encountered Problem】The tidbserver has already set a memory limit, but it still exceeds it.
【Reproduction Path】
【Problem Phenomenon and Impact】
image


| username: 长安是只喵 | Original post link

This is still an experimental feature and may have issues.
image

| username: ablewang_xiaobo | Original post link

I found the data in information_schema, but I don’t know the reason.

| username: 长安是只喵 | Original post link

Did you not reload the configuration with tiup cluster reload after modifying the configuration file?
https://docs.pingcap.com/zh/tidb/stable/maintain-tidb-using-tiup#修改配置参数

| username: ablewang_xiaobo | Original post link

Reload loaded.

| username: 长安是只喵 | Original post link

That shouldn’t be the case. Try loading it again.

| username: HACK | Original post link

Try restarting it.

| username: cs58_dba | Original post link

Tried the reload parameter modification in version 5.4 and it took effect.

| username: h5n1 | Original post link

resource_control:
memory_limit: “64G” Try using this limit

| username: ablewang_xiaobo | Original post link

Reloading didn’t work, and even after restarting the entire cluster, it’s still the same.

| username: 长安是只喵 | Original post link

:joy: Then it can only be attributed to experimental features. Unstable.

| username: ablewang_xiaobo | Original post link

It should be considered a bug.

| username: ablewang_xiaobo | Original post link

Where is this configured?

| username: 长安是只喵 | Original post link

Yes, I think it counts.

| username: MyronWang | Original post link

This is defined in the topology configuration file when “Deploying a TiDB Cluster via TiUP”. You can refer to the documentation: 通过 TiUP 部署 TiDB 集群的拓扑文件配置 | PingCAP 文档中心 (essentially using systemd’s system limitation features)

| username: h5n1 | Original post link

The image you provided is not accessible. Please provide the text you need translated.

| username: HACK | Original post link

According to this statement, is there still no way to limit the memory usage of tidb-server?

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.