当前位置:网站首页>Xtrabackup appears' flush no '_ WRITE_ TO_ BINLOG TABLES‘: 1205 (HY000) Lock wait timeout exceeded;
Xtrabackup appears' flush no '_ WRITE_ TO_ BINLOG TABLES‘: 1205 (HY000) Lock wait timeout exceeded;
2022-07-26 08:35:00 【YaoYuan ace】
xtrabackup Backup MySQL when , You may fail to get the lock and timeout , Here is the solution .
List of articles
The phenomenon
xtrabackup Backup MySQL The database has a timeout error :
Error: failed to execute query 'FLUSH NO_WRITE_TO_BINLOG TABLES': 1205 (HY000) Lock wait timeout exceeded; try restarting transaction
...
Error: failed to execute query 'FLUSH NO_WRITE_TO_BINLOG TABLES': 1205 (HY000) Lock wait timeout exceeded; try restarting transaction
resolvent
There are two solutions , One is modification xtrabackup Parameters of , The other is to kill threads that execute for a long time .
Kill long SQL The thread of :
Query threads with long execution time :
mysql> select * from processlist where command not like 'Sleep' order by time desc limit 3;
+-----+-----------------+-----------+--------+---------+--------+-------------------------+-----------------------------------------------+
| ID | USER | HOST | DB | COMMAND | TIME | STATE | INFO |
+-----+-----------------+-----------+--------+---------+--------+-------------------------+-----------------------------------------------+
| 5 | event_scheduler | localhost | NULL | Daemon | 432662 | Waiting on empty queue | NULL |
| 132 | root | localhost | sakila | Query | 632 | User sleep | select * from actor where actor_id=sleep(100) |
| 131 | root | localhost | NULL | Query | 628 | Waiting for table flush | flush table with read lock |
+-----+-----------------+-----------+--------+---------+--------+-------------------------+-----------------------------------------------+
3 rows in set (0.00 sec)
mysql>
mysql> kill 132;
Query OK, 0 rows affected (0.00 sec)
It can also be in sys.processlist、INFORMATION_SCHEMA.PROCESSLIST perhaps performance_schema.threads Found in it for a long time SQL, Just kill them .
modify xtrabackup Parameters of
For long execution time SQL, It can also be solved by modifying relevant parameters :
- Use –ftwrl-wait-* Series parameters , It means ready for execution FLUSH TABLES WITH READ LOCK When encountering a long wait SQL Wait for the set time while executing the statement , Timeout has not been completed , Backup exit announced failure .
- Use –kill-long-query-* Series parameters , It means to encounter a long wait SQL Statement execution time , Overtime is kill Off execution SQL sentence , And you can set SQL Type defaults to all .
- Use –safe-slave-backup-* Series parameters , It means backing up from the Library , Stop the backup first slave sql Threads , Prevent excessive length SQL Statement execution , Start after backup slave sql Threads .
At the bottom of the article is my wechat , Welcome to join me ( toeic 890 Points of Oracle ACE).
边栏推荐
- 有限元学习知识点备案
- [endnote] compilation of document types and abbreviations of document types
- KV database based on raft consensus protocol
- Shell programming
- 为什么要在时钟输出上预留电容的工位?
- Random distribution learning notes
- QT note 2
- 请问现在flinkcdc支持sqlserver实例名方式连接吗?
- Seq2seq and attention model learning notes
- Matplotlib learning notes
猜你喜欢
随机推荐
6、 Pinda general permission system__ pd-tools-log
【FreeSwitch开发实践】自定义模块创建与使用
Uninstallation of dual systems
Number of briquettes & Birthday Candles & building blocks
memorandum...
Please tell me if there is any way to increase the write out rate when the Flink SQL client is in the sink table. When synchronizing through sink table
2022-024ARTS:最长有效括号
Code cloud change remote warehouse command
shell编程
Prefix infix suffix expression (written conversion)
Redis advanced
QT uses QSS to make a beautiful login interface (hand-in-hand teaching)
Special Lecture 3 number theory + game theory learning experience (should be updated for a long time)
File management file system based on C #
Kotlin program control
Add in the registry right click to open in vscode
A summary of practical websites that won't brighten people's eyes
2022年全国职业院校技能大赛“网络安全”竞赛试题文件上传渗透测试答案Flag
The data read by Flink Oracle CDC is always null. Do you know
NLP (natural language processing) natural language processing learning









