Pt-online-schema-change showing this error " exceeds its critical threshold 50"


I have tried to do some test with pt-online-schema-change while adding partion in the below way, I am getting error,

root@Raja/mysqlbackup/percona-toolkit-2.2.4/bin# pt-online-schema-change --execute --user=root --password=mysqlpass --host=localhost --alter “partition by range(id) (partition po values less than (945268782),partition p1 values less than (945368782),partition p2 values less than (945468782),partition p3 values less than (945568782),partition p4 values less than (MAXVALUE))” D=Client,t=user
Operation, tries, wait:
copy_rows, 10, 0.25
create_triggers, 10, 1
drop_triggers, 10, 1
swap_tables, 10, 1
update_foreign_keys, 10, 1
Altering Client.user
Creating new table…
Created new table Client._user_new OK.
Altering new table…
Altered Client._user_new OK.
2013-09-27T06:09:44 Creating triggers…
2013-09-27T06:09:45 Created triggers OK.
2013-09-27T06:09:46 Copying approximately 368760 rows…
2013-09-27T06:09:47 Dropping triggers…
2013-09-27T06:09:51 Dropped triggers OK.
2013-09-27T06:09:51 Dropping new table…
2013-09-27T06:10:05 Dropped new table OK.
Client.user was not altered.
(in cleanup) 2013-09-27T06:09:47 Error copying rows from Client.user to Client._user_new: Threads_running=51 exceeds its critical threshold 50

2013-09-27T06:10:05 Dropping triggers…
2013-09-27T06:10:05 Dropped triggers OK.
Client.user was not altered.

How to fix this issue?

why it is showing this error ?

Server : Percona MySQL 5.5.30
Percona Tool kit version : percona-toolkit-2.2.4

This is a safety check done by the tool to try and prevent it from crashing the server:–max-load

Basically your online schema change is blocking other queries, which get queued up, causing Threads_running to increase, which eventually causes the tool to exit. If you are not concerned about this, you can increase the value with something like: --max-load “Threads_running=100” or whatever you want to set it to. But be careful, because if you load up the server too much it could end up crashing, which is why the checks are there to start with. =)

Thanks Scott it is working fine by using “–critical-load Threads_running=100”.

And I have another doubt that I have a table which already contains a trigger.How can i do partition for the table using pt-online-schema-change.Is there any other way to do it?


The tool will not if triggers are already defined on tables and documented in pt-online-schema-change