【TiDB 版本】
4.0.8
【问题描述】
ods_dj_prd_stock_adapter failed to execute:Out Of Memory Quota![conn_id=368597]
java.lang.Exception: Out Of Memory Quota![conn_id=368597]
默认
mysql> select @@tidb_mem_quota_query;
±-----------------------+
| @@tidb_mem_quota_query |
±-----------------------+
| 1073741824 |
±-----------------------+
1 row in set (0.01 sec)
改了2G
mysql> select @@tidb_mem_quota_query;
±-----------------------+
| @@tidb_mem_quota_query |
±-----------------------+
| 2147483648 |
±-----------------------+
1 row in set (0.00 sec)
退出session
mysql> \q
开启新session 查看
mysql> select @@tidb_mem_quota_query;
±-----------------------+
| @@tidb_mem_quota_query |
±-----------------------+
| 1073741824 |
±-----------------------+
1 row in set (0.01 sec)
mysql> set global tidb_mem_quota_query=‘2147483648’;
ERROR 1105 (HY000): Variable ‘tidb_mem_quota_query’ is a SESSION variable and can’t be used with SET GLOBAL
修改2G成功了 ,可是退出再进又变成了1G。。。。。。
conf/tidb.yaml
---
# default configuration file for TiDB in yaml format
global:
...
# Only print a log when out of memory quota.
# Valid options: ["log", "cancel"]
# oom-action: "log"
# Set the memory quota for a query in bytes. Default: 32GB
# mem-quota-query: 34359738368