pt-archiver dies with "MySQL server has gone away" when innodb_kill_idle_transaction set to low value and check-slave-lag used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Frank Cizmich |
Bug Description
How to repeat.
1. Install Percona server.
2. cd mysql-test
3. ./mtr --start --suite=rpl rpl_alter --mysqld=
4. Connect to slave, setup it:
CHANGE MASTER TO master_
START SLAVE SQL_THREAD;
Do not start IO thread yet!
5. Create test data on master:
mysql> CREATE TABLE test (
-> `id` int(11) NOT NULL AUTO_INCREMENT,
-> `nonce` varchar(255) DEFAULT NULL,
-> `timestamp` int(11) DEFAULT NULL,
-> `created_at` datetime DEFAULT NULL,
-> `updated_at` datetime DEFAULT NULL,
-> `site_id` int(11) unsigned DEFAULT NULL,
-> PRIMARY KEY (`id`),
-> UNIQUE KEY `index_
-> KEY `oauth_
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
insert into test(nonce,
insert into test(nonce,
Repeat last statements until you have 2,000,000 rows.
6. Run pt-archiver with following options:
pt-archiver --purge --quick --no-check-charset --statistics --buffer --bulk-delete --primary-key-only --max-lag 1 --check-interval 1 --check-slave-lag h=127.0.
7. You will see something like:
TIME ELAPSED COUNT
2015-04-27T22:10:30 0 0
8. Wait 61 or more seconds, then start slave IO thread.
9. After slave catches up with master you will see something like:
2015-04-27T22:12:38 128 1000
DBD::mysql::st execute failed: MySQL server has gone away [for Statement "DELETE QUICK FROM `test`.`test` WHERE (((`id` >= ?))) AND (((`id` <= ?))) AND (id<=1300000) LIMIT 1000" with ParamValues: 0='969118', 1='970117'] at /home/sveta/
tags: | added: i52898 |
tags: | added: pt-archiver |
Changed in percona-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.3.1 |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
tags: | added: i59430 |
--set-vars= innodb_ kill_idle_ transaction= 10000 does *not* work because innodb_ kill_idle_ transaction it is not a session variable. Sending a dummy SQL command such as "select null from dual" in the code during the sleep *does* work.