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

**URL:** <https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972>\
**Category:** Percona Toolkit\
**Created:** [September 27, 2013, 6:17am UTC](https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972 "2013-09-27T06:17:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raja](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Raja](https://forums.percona.com/u/Raja)\
**Post date:** [September 27, 2013, 6:17am UTC](https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972/1 "2013-09-27T06:17:35Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![scott.nemes](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/scott.nemes/32/5_2.png) [@scott.nemes](https://forums.percona.com/u/scott.nemes)\
**Post date:** [September 27, 2013, 9:33am UTC](https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972/2 "2013-09-27T09:33:57Z")

</div>

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

[url][pt-online-schema-change — Percona Toolkit Documentation](http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html#cmdoption-pt-online-schema-change--max-load%5B/url%5D)

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. =)

---

<div class="post-metadata">

**Author:** ![Raja](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Raja](https://forums.percona.com/u/Raja)\
**Post date:** [September 29, 2013, 11:35pm UTC](https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972/3 "2013-09-29T23:35:21Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [September 30, 2013, 5:39am UTC](https://forums.percona.com/t/pt-online-schema-change-showing-this-error-exceeds-its-critical-threshold-50/2972/4 "2013-09-30T05:39:53Z")

</div>

Hi,

The tool will not if triggers are already defined on tables and documented in [pt-online-schema-change](http://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html)
