Copying `test`.`testtable_copy1`: 99% 00:01 remain # Exiting on SIGHUP

Hi
When I use pt-online-schema-change 3.4.0 to add column to a large mysql table of 50 million, I get an error:Exiting on SIGHUP. Here are my steps and related information.

  1. OS version is CentOS 7.9 (Final) 4.14.105-19-0023.1 #1 SMP Tue Mar 8 15:12:36 CST 2022 x86_64 x86_64 x86_64 x86_64 GNU/Linux
  2. script:
    #! /bin/bash

host=“127.0.0.1”
port=“3306”
user=“root”
passwd=“password”
database=“test”
table=“test_copy1”

echo date +"%Y-%m-%d %H:%M:%S"
echo $table

/bin/pt-online-schema-change --host=${host} --port=${port} --user=${user} --password=${passwd} --recursion-method=processlist --no- version-check --charset=“utf8” --check-interval=5 --chunk-time=1 --max-load=threads_running:80 --max-lag=3 --chunk-size=3000 D=${database },t=${table}
–alter=“ADD COLUMN matrix_id tinyint(1) NOT NULL DEFAULT 0 COMMENT ‘matrix ID’ AFTER sid” --print --execute
3. Execution method:
nohup /bin/bash /mnt/add_modify_online.sh &
4. Error message:
Copying test.test_copy1: 99% 00:01 remain

Exiting on SIGHUP.

Not dropping triggers because the tool was interrupted. To drop the triggers, execute

Could anyone plz help me out? thx so much.

1 Like

Hi,

The triggers were not dropped automatically because the tool was interrupted.

You need to manually drop the triggers with the commands shown on the output of execution.

And the reason for the tool to be aborted could be many. Did you manually cancel pt-osc execution? Did threads_running reach 80 ? Was the server shutdown ?

I suggest you manually remove the triggers and then test again executing pt-osc while the load on the server is down and check if the issue persists. You should also use latest pt-osc version (v 3.5.1) just in case.

Regards

1 Like

Hi,

You might want to run it with PTDEBUG=1 to see what is happening in more detail, but beware, the output can be huge. Also, do you have enough disk space for the new table? And I’d suggest running the command in a screen session, rather than sending it to the background, for easier management.