New Query causing high IO / CPU on MySQL

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
Hello,

This started recently on all our shared servers.

| 61601370 | root | localhost | mysql | Query | 55 | checking permissions | SELECT TABLE_SCHEMA as database_name, TABLE_NAME as name FROM INFORMATION_SCHEMA.VIEWS WHERE SUBSTRI |
| 61601371 | root | localhost | mysql | Query | 55 | checking permissions | SELECT TABLE_SCHEMA as database_name, TABLE_NAME as name FROM INFORMATION_SCHEMA.VIEWS WHERE SUBSTRI |


I failed to save logs from yesterday but there was 8 or so of these queries running and a couple for hundreds of seconds in the 'checking permissions' state.
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
| 61706419 | root | localhost | mysql | Query | 180 | checking permissions | SELECT TABLE_SCHEMA as database_name, TABLE_NAME as name FROM INFORMATION_SCHEMA.VIEWS WHERE SUBSTRING_INDEX(DEFINER,'@',1) = 'cpses_mcMXu4Ofc2'
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello :)

What is the database name associated with those MySQL processes?

Thank you.
 

xqdm

Member
Oct 24, 2006
21
0
151
We're running into the exact same issue, contacted cPanel support whom advised that it's a bug and to add:

We've opened a ticket with whom have advised to include the following into the /etc/my.cnf:

innodb_stats_on_metadata=0

We've added this, however the problem persists.

It's affecting about 4 servers out of 40, and it's constantly causing MySQL to go offline.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
We're running into the exact same issue, contacted cPanel support whom advised that it's a bug and to add
Could you let us know the ticket number?

Thank you.
 

xqdm

Member
Oct 24, 2006
21
0
151
Hi Michael,

After a long last 2 days with this issue, I can confirm that the staff at cPanel have been doing an excellent job resolving this issue (they've supplied a patch an unofficial, very, very, very unsupported and possibly unsafe workaround). The ticket ID is: 5692589

We've applied a patch unadvised workaround supplied by cPanel as a temporary measure until 11.46.1 is released into RELEASE. Never the less its good in-case anyone else is also experiencing this issue to contact cPanel should be made aware of this problem as it was very random at best to just do this across 4 - 8 of our servers.

Edit: cPanel does not recommend the workaround provided, and you should wait until we push the fix upstream.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
This has been reproduced happening when the "Logout" button in cPanel is clicked for an account. When this happens, it can cause the cpses_tool to perform a query against the INFORMATION_SCHEMA that can sometimes result in a Long Running MySQL query. Changes stemming from internal case number 108585 should address this issue, but there is currently no specific time frame available on when those changes will be published.

Thank you.
 

cPanelPeter

Senior Technical Analyst
Staff member
Sep 23, 2013
586
25
153
cPanel Access Level
Root Administrator
Hello,

It should be noted that the patch (or as now noted the unadvised workaround) that was provided to the customer in ticket # 5692589 worked for that customer, but there is NO GUARANTEE that it will work for others. We've seen a number of people requesting that we supply them with "the patch" to fix this issue. In all those tickets that I've personally looked at, the issue was NOT the same and therefore the patch would not work for them.

It's important to note that applying a patch or workaround from an EDGE tier is not recommended by cPanel. Just because it worked for one customer does not mean it won't cause problems for others. Please do not request this workaround from us as it will most likely cause other problems that you do not want to have.

This fix should be available across all tiers within the coming weeks, please stand by and let our QA analysts fully test this.