WordPress database error Lost connection to MySQL server during query

Posted in: Newspaper
Post count: 7

Hi, I’m using Newspaper Theme version 7.7 WooCommerce. I am getting a database error/lost connection when executing a query that the plugin QB Monitor is saying originates from the parent theme. This is executing on PromGuide.com. Please advise. See below:

GETTING THIS ERROR IN LOG
[27-Apr-2017 16:52:58 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT t.*, tt.* FROM wp_5m8z8j7g32_terms AS t INNER JOIN wp_5m8z8j7g32_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN (‘category’) ORDER BY t.name ASC made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), include(‘/themes/Newspaper/functions.php’), require_once(‘/themes/Newspaper/includes/wp_booster/td_wp_booster_functions.php’), do_action(‘td_global_after’), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, td_config::on_td_global_after_config, td_config::get_map_filter_array, td_util::get_category2id_array, get_categories, get_terms, WP_Term_Query->query, WP_Term_Query->get_terms, QM_DB->query

GETTING THIS INFO USING QUERY MONITOR PLUGIN

22 SELECT t.*, tt.*
FROM wp_5m8z8j7g32_terms AS t
INNER JOIN wp_5m8z8j7g32_term_taxonomy AS tt
ON t.term_id = tt.term_id
WHERE tt.taxonomy IN (‘category’)
ORDER BY t.name ASC

WP_Term_Query->get_terms()
wp-includes/class-wp-term-query.php:686

WP_Term_Query->query()
wp-includes/class-wp-term-query.php:291
get_terms()
wp-includes/taxonomy.php:1119
get_categories()
wp-includes/category.php:54
td_util::get_category2id_array()
wp-content/themes/Newspaper/includes/wp_booster/td_util.php:567
td_config::get_map_filter_array()
wp-content/themes/Newspaper/includes/td_config.php:6171
td_config::on_td_global_after_config()
wp-content/themes/Newspaper/includes/td_config.php:2279
do_action(‘td_global_after’)
wp-includes/plugin.php:453

Parent Theme 36 0.0038

Post count: 9544

How much RAM do you have allocated to WP in your wp-config.php file and PHP setup?

What version of WordPress?

What version of WooCommerce?

What timeout settings do you have for PHP?

These all impact that quite a bit.

Post count: 7

Hi Thanks for your prompt reply, please see my responses below:

How much RAM do you have allocated to WP in your wp-config.php file and PHP setup? 512MB

What version of WordPress? 4.7.4

What version of WooCommerce? 2.6.14

What timeout settings do you have for PHP?

post_max_size = 512M
upload_max_filesize = 512M
memory_limit = 512M
max_execution_time = 300
max_input_vars = 10000
max_file_uploads = 75
max_input_time = 600

Post count: 9544

I changed my max execution time to 600 which we then made default minimum on server, as 300 too short for modern WP stuff it seems.

Also make sure using PHP 5.6 or higher (e.g., 5.6.30 with opcache ‘on’). 5.4 is a dog!

Might check those.

Also, periodically
a) resave permalinks
b) clear transients with WP-Optimize or similar.

This clears ‘cobwebs’ esp. after ANY major updates.

Also, be careful with updating plugins for WooCommerce 2x now that 3x is out. I updated to 3X and everything still works, but did get several “your custom templates need updating” notices. Still works though 🙂

( I don’t work here. )

Post count: 7

Thank you.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.