Percona Toolkit "Not dropping triggers because the tool was interrupted"

I am trying to run this command below, but the process gets interrupted as evident by the screenshot. Is the table too big or could the problem be that the host is a replica database in AWS?

pt-online-schema-change --execute --alter "CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci" h=....>,D=...,t=...,u=...,p=... > pt-logs.txt

No slaves found.  See --recursion-method if host ip-xx-x-x-xxx has slaves.
Not checking slave lag because no slaves were found and --check-slave-lag was not specified.

# A software update is available:
Operation, tries, wait:
  analyze_table, 10, 1
  copy_rows, 10, 0.25
  create_triggers, 10, 1
  drop_triggers, 10, 1
  swap_tables, 10, 1
  update_foreign_keys, 10, 1
Altering `db`.`table`...
Creating new table...
Created new table `db`.`table`_new OK.
Altering new table...
Altered `db`.`table`_new` OK.
2022-11-15T07:14:47 Creating triggers...
2022-11-15T07:14:47 Created triggers OK.
2022-11-15T07:14:48 Copying approximately 22875679 rows...
Not dropping triggers because the tool was interrupted.  To drop the triggers, execute:
DROP TRIGGER IF EXISTS `db`.`pt_osc_table_del`
DROP TRIGGER IF EXISTS `db`.`pt_osc_table_upd`
DROP TRIGGER IF EXISTS `db`.`pt_osc_table_ins`
Not dropping the new table `db`.`_table_new` because the tool was interrupted.  To drop the new table, execute:
DROP TABLE IF EXISTS `db`.`_table_new`;
`db`.`table` was not altered.
No slaves found.  See --recursion-method if host ip-xx-x-x-xx has slaves.

I am currently running another test, but I am expecting the same issue after it has finished copying
image

The error happened again

1 Like

Hi, something is killing the pt-osc session. Did you check for any other error messages? The table size does not matter in this case. You can also run the tool with PTDEBUG=1 pt-online-schema-change … to see more detailed output

1 Like

This is all I get and then it doesn’t continue with the process when running PTDEBUG=1 pt-online-schema-change --execute --alter “CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci” h=host,D=db,t=table,u=username,p=password > pt-logs.txt 2>&1. Also I cleared the Triggers.

[admin@ip-xxx-xx-xx-xxx bin]# PTDEBUG=1 pt-online-schema-change --execute --alter "CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci" h=host,D=db,t=table,u=username,p=password > pt-logs.txt 2>&1
[admin@ip-xxx-xx-xx-xx bin]# vi pt-logs.txt
[admin@ip-xxx-xx-xx-xx bin]# vi pt-logs.txt
# /usr/bin/perl 5.016003
# Linux ip-xxx-xx-xx-xx.ec2.internal.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
# Arguments: _[--execute]_ _[--alter]_ _[CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci]_ _[h=host,D=db,t=table,u=username,p=password]_
# OptionParser:340 17242 Option rule: --dry-run and --execute are mutually exclusive.
# OptionParser:340 17242 Option rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details.
# OptionParser:349 17242 =item --alter
# OptionParser:376 17242 Short help: The schema modification, without the ALTER TABLE keywords
# OptionParser:349 17242 =item --alter-foreign-keys-method
# OptionParser:376 17242 Short help: How to modify foreign keys so they reference the new table
# OptionParser:349 17242 =item --[no]analyze-before-swap
# OptionParser:376 17242 Short help: Execute ANALYZE TABLE on the new table before swapping with the old one
# OptionParser:349 17242 =item --ask-pass
# OptionParser:368 17242 Option has no attributes
# OptionParser:376 17242 Short help: Prompt for a password when connecting to MySQL
# OptionParser:349 17242 =item --channel
# OptionParser:376 17242 Short help: Channel name used when connected to a server using replication channels
# OptionParser:349 17242 =item --charset
# OptionParser:376 17242 Short help: Default character set
# OptionParser:349 17242 =item --[no]check-alter
# OptionParser:376 17242 Short help: Parses the --alter specified and tries to warn of possible unintended behavior
# OptionParser:349 17242 =item --[no]check-foreign-keys
# OptionParser:376 17242 Short help: Check for self-referencing foreign keys
# OptionParser:349 17242 =item --check-interval
# OptionParser:376 17242 Short help: Sleep time between checks for --max-lag
# OptionParser:349 17242 =item --[no]check-plan
# OptionParser:376 17242 Short help: Check query execution plans for safety
# OptionParser:349 17242 =item --[no]check-replication-filters
# OptionParser:376 17242 Short help: Abort if any replication filter is set on any server
# OptionParser:349 17242 =item --check-slave-lag
# OptionParser:376 17242 Short help: Pause the data copy until this replica's lag is less than --max-lag
# OptionParser:349 17242 =item --chunk-index
# OptionParser:376 17242 Short help: Prefer this index for chunking tables
1 Like

I deleted the new table and the triggers, ran it again, and this time it worked for some reason.

1 Like