【TiDB 使用环境】生产环境
【TiDB 版本】8.5.1
【操作系统】centos7.9
【部署方式】阿里云
【集群数据量】
【集群节点数】2 tidb-server 4tikv 1tiflash 3pd-server
【问题复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
目前tidb-server是16核32G 2台,设置了tidb_server_memory_limit参数24G,tidb_mem_quota_query参数值16G;
MySQL [(none)]> SHOW VARIABLES LIKE ‘tidb_server_memory_limit’;
±-------------------------±------+
| Variable_name | Value |
±-------------------------±------+
| tidb_server_memory_limit | 24GB |
MySQL [(none)]> SHOW VARIABLES LIKE ‘tidb_mem_quota_query’;
±---------------------±------------+
| Variable_name | Value |
±---------------------±------------+
| tidb_mem_quota_query | 17179869184 |
±---------------------±------------+
1 row in set (0.00 sec)
MySQL [(none)]> select 17179869184/1024/1024/1024;
±---------------------------+
| 17179869184/1024/1024/1024 |
±---------------------------+
| 16.000000000000 |
±---------------------------+
1 row in set (0.01 sec)
MySQL [(none)]>
跑定时任务数据量500-600万怎么会出现内存不足情况,具体报错信息如下:
09-05-2025 14:04:42 CST task_batch_service INFO - ERROR 8176 (HY000) at line 9 in file: ‘/data/server/service/batch_service.sql’: Your query has been cancelled due to exceeding the allowed memory limit for the tidb-server instance and this query is currently using the most memory. Please try narrowing your query scope or increase the tidb_server_memory_limit and try again.[conn=3038166426]
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【复制黏贴 ERROR 报错的日志】
【其他附件:截图/日志/监控】