Title: w3 total cache ~ generating php sql db errors
Last modified: August 21, 2016

---

# w3 total cache ~ generating php sql db errors

 *  [hexangel](https://wordpress.org/support/users/hexangel/)
 * (@hexangel)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/w3-total-cache-generating-php-sql-db-errors/)
 *     ```
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT meta_id FROM wp_postmeta WHERE meta_key = '_aioseop_noindex' AND post_id = 3842 made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), call_user_func_array, All_in_One_SEO_Pack->save_post_data, delete_post_meta, delete_metadata, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts WHERE ID = 3842 LIMIT 1 made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), call_user_func_array, All_in_One_SEO_Pack->save_post_data, delete_post_meta, wp_is_post_revision, wp_get_post_revision, get_post, WP_Post::get_instance, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT meta_id FROM wp_postmeta WHERE meta_key = '_aioseop_disable_analytics' AND post_id = 3842 made by edit_post, wp_update_post, wp_insert_post, do_action('save_post'), call_user_func_array, All_in_One_SEO_Pack->save_post_data, delete_post_meta, delete_metadata, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts WHERE ID = 3842 LIMIT 1 made by edit_post, _fix_attachment_links, get_post, WP_Post::get_instance, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT option_value FROM wp_options WHERE option_name = 'permalink_structure' LIMIT 1 made by edit_post, _fix_attachment_links, get_option, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts WHERE ID = 3842 LIMIT 1 made by edit_post, wp_set_post_lock, get_post, WP_Post::get_instance, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT option_value FROM wp_options WHERE option_name = 'sticky_posts' LIMIT 1 made by edit_post, unstick_post, get_option, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts WHERE ID = 3842 LIMIT 1 made by redirect_post, get_post_status, get_post, WP_Post::get_instance, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT * FROM wp_posts WHERE ID = 3842 LIMIT 1 made by redirect_post, get_edit_post_link, get_post, WP_Post::get_instance, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       Apr 24, 10:11:09	 WordPress database error MySQL server has gone away for query SELECT option_value FROM wp_options WHERE option_name = 'wpmp_mpexo_enabled_beta' LIMIT 1 made by shutdown_action_hook, do_action('shutdown'), call_user_func_array, wpmp_mpexo_shutdown, wpmp_mpexo_send_payload, get_option, W3_Db->query, W3_DbCache->query, W3_DbCallUnderlying->query, W3_Db->query, W3_DbProcessor->query, W3_Db->default_query
       ```
   
 * Any ideas what could be cause W3 to be throwing these kinds of php errors consistently?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [hexangel](https://wordpress.org/support/users/hexangel/)
 * (@hexangel)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/w3-total-cache-generating-php-sql-db-errors/#post-3689039)
 * For the time-being, I’ve turned off db caching, which appears to have resolved
   the issue.
 * However, I believe these errors in particular were thrown by wp-admin updating
   a post … which seems to me mighty odd since the cache is intended for users of
   the site, not administration of the blog.
 *  [vietnhi](https://wordpress.org/support/users/vietnhi/)
 * (@vietnhi)
 * [13 years ago](https://wordpress.org/support/topic/w3-total-cache-generating-php-sql-db-errors/#post-3689322)
 * I faced the same error. In fact, if I dont disabled W3TC, all my posts, products,…
   disappear (PHP cant connect to mysql to retrieve the data).
 * Any fix for this ??
 * Regards,
    Viet
 *  [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years ago](https://wordpress.org/support/topic/w3-total-cache-generating-php-sql-db-errors/#post-3689323)
 * W3 doesn’t “cause” those errors. W3TC adds a drop in that allows W3 to cache 
   read operations from MySQL. That is why you see W3 being appended to those errors,
   it’s not originating problems that didn’t exist before. If you’re using DB caching
   to disk, it probably isn’t providing a performance improvement and you should
   test that.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘w3 total cache ~ generating php sql db errors’ is closed to new replies.

## Tags

 * [database errors](https://wordpress.org/support/topic-tag/database-errors/)

 * 3 replies
 * 3 participants
 * Last reply from: [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/w3-total-cache-generating-php-sql-db-errors/#post-3689323)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
