TiDB 报错: GC life time is shorter than transaction duration
报错信息:Could not read data from track.ods_online_log_mark: GC life time is shorter than transaction duration,
transaction starts at 2019-03-30 12:32:26.817 +0800 CST, GC safe point is 2019-03-30 12:34:04.467 +0800 CST--TiDB版本:
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.1
Git Commit Hash: 990f859384b834fe5edf1410d2a4142def5c3fa9
Git Branch: release-2.1
UTC Build Time: 2018-12-12 10:57:44
GoVersion: go version go1.11.2 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.03 sec)
默认参数查看:
mysql> select *from mysql.tidb;
+-----------------------+----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| VARIABLE_NAME | VARIABLE_VALUE | COMMENT |
+-----------------------+----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| bootstrapped | True | Bootstrap flag. Do not delete. |
| tidb_server_version | 24 | Bootstrap version. Do not delete. |
| system_tz | Asia/Shanghai | TiDB Global System Timezone. |
| tikv_gc_leader_uuid | 5a6e67ffe4c0002 | Current GC worker leader UUID. (DO NOT EDIT) |
| tikv_gc_leader_desc | host:cloudera2.node2.hadoop.xyz.com, pid:15435, start at 2019-03-26 18:51:04.47566521 +0800 CST m=+0.210349720 | Host name and pid of current GC leader. (DO NOT EDIT) |
| tikv_gc_leader_lease | 20190330-13:47:04 +0800 CST | Current GC worker leader lease. (DO NOT EDIT) |
| tikv_gc_run_interval | 10m0s | GC run interval, at least 10m, in Go format. |
| tikv_gc_life_time | 10m0s | All versions within life time will not be collected by GC, at least 10m, in Go format. |
| tikv_gc_last_run_time | 20190330-13:34:04 +0800 CST | The time when last GC starts. (DO NOT EDIT) |
| tikv_gc_safe_point | 20190330-12:34:04 +0800 CST | All versions after safe point can be accessed. (DO NOT EDIT) |
| tikv_gc_concurrency | 3 | How many go routines used to do GC parallel, [1, 128], default 2 |
+-----------------------+----------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
11 rows in set (0.03 sec)
原因:
GC Life Time 间隔时间过短,长事务本应读到的数据可能被清理了,可使用如下命令增加 GC Life Timeupdate mysql.tidb set variable_value='30m' where variable_name='tikv_gc_life_time';
其中 30m 代表仅清理 30 分钟前的数据,这可能会额外占用一定的存储空间其中, tikv_gc_run_interval , tikv_gc_life_time , tikv_gc_concurrency 这三条记录可以手动配置。
其余带有 tikv_gc 前缀的记录为当前运行状态的记录, TiDB 会自动更新这些记录,请勿手动修改。时长字符串的形式是数字后接时间单位的序列,如 24h 、 2h30m 、 2.5h 。可以使用的时间单位包括 "h"、"m"、"s"。需要注意的是,在数据更新频繁的场景下如果将 tikv_gc_life_time 设置得比较大(如数天甚至数月),可能会有
一些潜在的问题:tikv_gc_life_time
tikv_gc_concurrency 是运行 GC 的并发数。默认该选项为 1,即单线程运行,逐个向每个涉及的 Region 发起请求
并等待响应。可以增加该数值以改善性能,最大不能超过 128。tikv_gc_leader_uuid , tikv_gc_leader_desc , tikv_gc_leader_lease 是当前的 GC leader 的信息。tikv_gc_last_run_time 是上一次执行 GC 的时间。tikv_gc_safe_point 的含义是,在该时间点以前的版本已经被 GC 清理,并保证该时间点以后的读取可以正确进行。
TiDB 报错: GC life time is shorter than transaction duration相关推荐
- TIDB GC life time is shorter than transaction duration解决方法
在TIDB中耗时事务例如备份可能会报GC life time is shorter than transaction duration 查看tidb的参数 select * from mysql.ti ...
- TIDB报错statement count 5001 exceeds the transaction limitation, autocommit = false问题解决
[TiDB 版本]:3.0.12 报错信息:statement count 5001 exceeds the transaction limitation, autocommit = false 开发 ...
- 带着问题读 TiDB 源码:Power BI Desktop 以 MySQL 驱动连接 TiDB 报错
原文来源: https://tidb.net/blog/d343818b 作者:张翔 常有人说,阅读源码是每个优秀开发工程师的必经之路,但是在面对像类似 TiDB 这样复杂的系统时,源码阅读是一个非常 ...
- IDEA mvn 报错GC overhead limit exceeded
在idea中添加maven的构建命令,执行的时候报错:[ERROR] GC overhead limit exceeded -> [Help 1] 这是因为项目太大了,mvn在执行过程中内存不够 ...
- spark 写入tidb 报错read-uncommitted is not supported
报错日志: Caused by: java.sql.SQLException: The isolation level 'READ-UNCOMMITTED' is not supported. Set ...
- mysql 中lock wait_应用中MYSQL 报错Lock wait timeout exceeded; try restarting transaction
最近开发的应用开始做性能测试.在小于80用户并发的时候一切OK,并发量到100用户时,持续压5分钟.应用开始报错,并且只有1次错误,持续时间长,比如10分钟,会报3次. 日志如下: Caused by ...
- RSR 服务器 进行RTMP推流报错:Failed to update header with correct duration Failed to update header with
ubuntu18.04下报错 修改方法 添加命令-flvflags no_duration_filesize 参数告诉ffmpeg不要抛出duration_filesize警告 egg: ffmpeg ...
- SpringBoot 中使用HikariPool 报错Possibly consider using a shorter maxLifetime value.
SpringBoot 使用HikariPool遇到: HikariPool-1 - Failed to validate connection com.mysql.jdbc.JDBC4Connecti ...
- SpringCloud 中使用HikariPool 报错Possibly consider using a shorter maxLifetime value
SpringCloud 或 SpringBoot 使用HikariPool遇到: com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to ...
最新文章
- 用c++写一个猜数字的小游戏
- 计算机主板在哪里找,台式电脑主板型号在哪里看
- 极富创意的404错误个性页面设计欣赏
- tencent intern learning
- bpmn文件的标签为何都以bpmn2开头_C语言之两种作用域:函数的作用域与文件作用域...
- P1537 弹珠 背包可行性dp
- 使用VLC转码,在HTML5页面播放实时监控
- 【软件工程】抽象泄漏
- 下一个技术之城:长沙
- Python 使用pyinstaller将py文件发布成exe程序
- Finaldata数据恢复软件官方版
- mesa3d源代码阅读笔记
- 双11,立减¥3554!戴尔官网撩客服砍价带走高性能电脑,速来!
- 动画图解:十大经典排序算法动画与解析,看我就够了(配代码完全版)
- c语言 界面编程 毕业设计,基于c语言的毕业设计.docx
- Java总结及面试题
- Pytorch Tutorial 学习笔记(六)模型部署
- helm install Error: timed out waiting for the condition
- js数组操作(pop,push,unshift,splice,shift方法)
- Spring Boot配置ssl证书
热门文章
- 用html5做课件,涨姿势┃一分钟PPT轻松转化H5,让“课件”动起来
- 精品基于PHP实现的剧影评|剧评影评系统
- 部分MacBook Pro突然无法充电,电量为什么显示为1%
- Kusto Query Language (KQL) 学习笔记
- GNU/Linux智能Makefile模板(多目录,多文件)
- 定时脚本任务列子(crontab)
- python 抓图_教程|Python抓图教程(下)
- [Tableau] 饼图绘制
- Non-resolvable parent POM for com.example:demo:0.0.1-SNAPSHOT: Could not transfer artifact org.sprin
- 第006话 皮皮和月亮石!