WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#41321 closed defect (bug) (duplicate)

WP won't handle MySQL max_queries_per_hour limit on page load

Reported by: ledgr Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Database Keywords:
Focuses: Cc:
PR Number:

Description

When mysql max_queries_per_hour is reached queries fail at the beginning of page load and WordPress fails with wrong(?) error output.

Warning: mysqli_set_charset(): Error executing query in /storage/ssd3/843
/1561843/public_html/wp-includes/wp-db.php on line 824

Warning: Cannot modify header information - headers already sent by (output 
started at /storage/ssd3/843/1561843/public_html/wp-includes/wp-db.php:824) in 
/storage/ssd3/843/1561843/public_html/wp-includes/pluggable.php on line 1210

And this is example of error if limit is reached in the middle of page load:

WordPress database error: [User 'id1561843_wp_ac6601cd835' has exceeded the 'max_queries_per_hour' resource (current value: 100)]
SELECT option_value FROM wp_options WHERE option_name = '_site_transient_update_plugins' LIMIT 1

WordPress database error: [User 'id1561843_wp_ac6601cd835' has exceeded the 'max_queries_per_hour' resource (current value: 100)]
SELECT option_value FROM wp_options WHERE option_name = '_site_transient_update_themes' LIMIT 1

WordPress database error: [User 'id1561843_wp_ac6601cd835' has exceeded the 'max_queries_per_hour' resource (current value: 100)]
SELECT option_value FROM wp_options WHERE option_name = '_site_transient_update_core' LIMIT 1

WordPress database error: [User 'id1561843_wp_ac6601cd835' has exceeded the 'max_queries_per_hour' resource (current value: 100)]
SELECT comment_approved, COUNT( * ) AS total FROM wp_comments GROUP BY comment_approved 

To replicate do:

update mysql.user set max_questions=100, max_updates=100 where user='id1561843_wp_ac6601cd835';
flush privileges;

Change History (2)

#1 @ocean90
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.8 deleted

Hello @ledgr, welcome to WordPress Trac!

Thanks for your report, we already track this issue in #41302.

#2 @ledgr
2 years ago

Technically this is not a duplicate :)

This ticket describes a bug in WordPress. The situation in #41302 (loading and never finishing) is caused by mysql proxy between wordpress site and mysql database. #41302 can be closed or merged into this one.

So the situation we are having is caused by bugs in two systems:

  • This ticket - a bug in WP
  • #41302 - a bug in mysql proxy
Note: See TracTickets for help on using tickets.