Title: Database error
Last modified: April 25, 2023

---

# Database error

 *  Resolved [macbook71](https://wordpress.org/support/users/macbook71/)
 * (@macbook71)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/database-error-384/)
 * Good morning,
   Since updating the rank math and autoptomize plugins, I often encounter
   database errorsHere is the message received in Rank math:
 *     ```wp-block-code
       [25-Apr-2023 06:40:44 UTC] WordPress database error MySQL server has gone away for query
   
                                   SELECT   wp_posts.ID
   
                                   FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
   
                                   WHERE 1=1  AND (
   
         ( wp_postmeta.meta_key = 'rank_math_pillar_content' AND wp_postmeta.meta_value = 'on' )
   
       ) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish'))
   
                                   GROUP BY wp_posts.ID
   
                                   ORDER BY wp_posts.post_date DESC
   
                           made by WP_List_Table->views, apply_filters('views_edit-post'), WP_Hook->apply_filters, RankMath\Admin\Post_Filters->add_pillar_content_filter_link, get_posts, WP_Query->query, WP_Query->get_posts
   
       [25-Apr-2023 06:40:55 UTC] WordPress database error MySQL server has gone away for query
   
                                   SELECT   wp_posts.ID
   
                                   FROM wp_posts  INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
   
                                   WHERE 1=1  AND (
   
         ( wp_postmeta.meta_key = 'rank_math_pillar_content' AND wp_postmeta.meta_value = 'on' )
   
       ) AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish'))
   
                                   GROUP BY wp_posts.ID
   
                                   ORDER BY wp_posts.post_date DESC
   
                           made by WP_List_Table->views, apply_filters('views_edit-post'), WP_Hook->apply_filters, RankMath\Admin\Post_Filters->add_pillar_content_filter_link, get_posts, WP_Query->query, WP_Query->get_posts
   
       [25-Apr-2023 11:28:38 UTC] WordPress database error MySQL server has gone away for query SELECT COUNT(*) FROM wp_term_relationships, wp_posts WHERE wp_posts.ID = wp_term_relationships.object_id AND post_status IN ('publish') AND post_type IN ('post') AND term_taxonomy_id = 44 made by edit_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action('transition_post_status'), WP_Hook->do_action, WP_Hook->apply_filters, _update_term_count_on_transition_post_status, wp_update_term_count, wp_update_term_count_now, _update_post_term_count
       ```
   
 * Can you help me please ?

Viewing 1 replies (of 1 total)

 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * (@rankmathteam)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/database-error-384/#post-16690810)
 * Hello [@macbook71](https://wordpress.org/support/users/macbook71/),
 * Thank you for your query and we are so sorry about the trouble this must have
   caused.
 * Can you please let us know if you are still experiencing the error when you open
   any post with pillar content?
 * Please get in touch with your web host and ask them to set at least the following
   values:
   `PHP Memory Limit: 512MMax input time: 150PHP time limit: 120PHP max 
   input variables: 1000
 * If that doesn’t help, you can set the proper query timeout by following this 
   guide: [https://subinsb.com/fix-wordpress-error-mysql-server-has-gone-away/](https://subinsb.com/fix-wordpress-error-mysql-server-has-gone-away/)
 * Please ensure to take a full backup of your website first before following the
   guide above.
 * Let us know how that goes. Looking forward to helping you.

Viewing 1 replies (of 1 total)

The topic ‘Database error’ is closed to new replies.

 * ![](https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330)
 * [Rank Math SEO – AI SEO Tools to Dominate SEO Rankings](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-by-rank-math/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-by-rank-math/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-by-rank-math/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-by-rank-math/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-by-rank-math/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Rank Math Support](https://wordpress.org/support/users/rankmathteam/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/database-error-384/#post-16690810)
 * Status: resolved