Okay
  Public Ticket #2450226
MySQL query spam
Closed

Comments

  • Andy started the conversation

    Our website crashing with this error.

    Warning: mysqli_real_connect(): (42000/1226): User 'USER' has exceeded the 'max_user_connections' resource (current value: 25) in /home/PATH/wp-includes/wp-db.php on line 1626

    Has massive amount of SQL queries running related to wpdatatables, all the same:

    20515788 DATABASE localhost USER Query 8570 Waiting for table metadata lock ALTER TABLE wp_wpdatatables_columns MODIFY COLUMN column_type 

    These show up in SQL processlist as:

    | 21094556 | DATABASE | localhost | USER| Query | 4890 | Waiting for table level lock | UPDATE `wp_wpdatatables_columns` SET `column_type` = 'masterdetail' WHERE `orig_header` = 'master | 0.000 |

    Please advise why this is happening - we are not working on wpdatatables when this occurs and crashes site.



  •  2,507
    Aleksandar replied

    Hello Andy

    Thank you for your purchase, and sorry to hear you're having issues with the table.

    Can you please tell me what query you're using? What table? What are the changes you're trying to make?

    As much detail as possible, please.


    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Andy replied privately
  • Andy replied

    Whatever this is seems to relate to masterdetail addon. When the processlist was cleared allowing us back into website, all 12 databases had master detail functionality turned on in admin, but it was not present on frontend. When we toggled the masterdetail status, it came back.

  •  2,507
    Aleksandar replied

    Hi again Andy

    Well, I suppose you made some changes in the tables (perhaps moved the Master-Detail column or deactivated and activated the plugin), and the plugin tried to assign the "masterdetail" type to the columns. I cannot say for sure.

    If I understood you correctly - the issue is resolved now?

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Andy replied

    No, this is not resolved. It still happens.
    No, we did not make changes to the tables before the problem.
    Please understand we are not using wpdatatables when this problem occurs.

    We have much more detail on this now however;

    We have further narrowed the trigger

    • these spam queries regards masterdetail occur when a WooCommerce product is updated. 
    • It does not occur when a page or post is updated.

    6 queries are created, for each product update. 

    These queries time out. That means if enough products are updated in a short period ()only around 4 or so), the WordPress database user hits max_user_connections.

    15 seconds after updating one WooCommerce product, here are the queries on the server:

    Here is my processlist query, we expect that:

        -> | 22522955 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |    0 | Init                            | show full processlist                                                                                                                                                               |    0.000 |

    Then masterdetail related queries, one like this:


        -> | 22524175 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |   15 | Waiting for table level lock    | UPDATE `hdgtf_wpdatatables_columns` SET `column_type` = 'masterdetail' WHERE `orig_header` = 'masterdetail'                                                                         |    0.000 |

    Then 5 like this:


        -> | 22524176 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |   15 | Waiting for table metadata lock | ALTER TABLE hdgtf_wpdatatables_columns MODIFY COLUMN column_type ENUM('autodetect','string','int','float','date','link','email','image','formula','datetime','time','masterdetail') |    0.000 |
        -> | 22524177 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |   15 | Waiting for table metadata lock | ALTER TABLE hdgtf_wpdatatables_columns MODIFY COLUMN column_type ENUM('autodetect','string','int','float','date','link','email','image','formula','datetime','time','masterdetail') |    0.000 |
        -> | 22524178 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |   15 | Waiting for table metadata lock | ALTER TABLE hdgtf_wpdatatables_columns MODIFY COLUMN column_type ENUM('autodetect','string','int','float','date','link','email','image','formula','datetime','time','masterdetail') |    0.000 |
        -> | 22524179 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |   15 | Waiting for table metadata lock | ALTER TABLE hdgtf_wpdatatables_columns MODIFY COLUMN column_type ENUM('autodetect','string','int','float','date','link','email','image','formula','datetime','time','masterdetail') |    0.000 |
        -> | 22524291 | lxuqyepr_bafhs | localhost | lxuqyepr_bafhs | Query   |    0 | Waiting for table metadata lock | ALTER TABLE hdgtf_wpdatatables_columns MODIFY COLUMN column_type ENUM('autodetect','string','int','float','date','link','email','image','formula','datetime','time','masterdetail') |    0.000 |

    Clearly these queries shouldnt be happening! 

  •  2,507
    Aleksandar replied

    Alright, Andy

    I'll forward the issue to one of our developers for testing.

    In case he needs remote access, would you be able to provide me a temporary WP-admin login for your site where this happens, FTP access credentials and the Database (PHPMyAdmin or cPanel), so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. 


    You can write credentials here because this ticket is private and nobody can see it except us.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Andy replied privately
  •   Aleksandar replied privately
  •  2,507
    Aleksandar replied

    Hello Andy

    We've just released updated versions of all our add-ons, and wpDataTables.

    Can you please update Master-Detail and wpDataTables to the latest versions? The issue should be resolved.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables