WordPress.org

Ready to get started?Download WordPress

Forums

WordPress database error MySQL server has gone away for query UPDATE (9 posts)

  1. Ravi Ahuja
    Member
    Posted 1 year ago #

    I am using latest version of WordPress and I update WordPress and Plugins as there is a new version.

    From past few months I am facing some problem like "Internal Server Error", "Timeout error" Disk space filling with log files etc.

    I am not a programming expert nor expert in managing hosting. I am using VPS hosting with 2GB RAM (Managed hosting) about 15 blog hosted. For me it is not possible to know which blog is causing problem.

    I requested my hosting provider to check these issue, they tried many things but nothing happen. Few days back I access log files and found lot of "WordPress database error MySQL server has gone away for query UPDATE wp_options SET option_value = " errors.

    I searched the log file and felt that "W3 Total Cache" plugin is causing the problem. I deactivated W3 Total Cache from all my blogs. After deactivating W3 Total Cache "Time out errors are gone and my blog is running fine.

    Today I decided to check error logs and find same errors "WordPress database error MySQL server has gone away for query UPDATE wp_options SET option_value ="

    I am not able to understand why these errors are creating as website is running fine and this time I am not able to figure-out what can be the reason. I found same error in 2 of my blogs (not checked other).

    I am listing some lines of error log please help me to know what is creating problem.

    WordPress database error MySQL server has gone away for query UPDATE wp_options SET option_value = 'a:12278:{i:0;a:3:{s:1:\\"s\\";s:1:\\"2\\";s:1:\\"t\\";s:10:\\"2012-09-30\\";s:1:\\"p\\";s:8:\\"homepage\\";}i:1;a:4:{s:1:\\"s\\";s:1:\\"2\\";s:1:\\"t\\";s:10:\\"2012-09-30\\";s:1:\\"p\\";s:8: .......

    :1:\\"2\\";s:1:\\"t\\";s:10:\\"2012-11-11\\";s:1:\\"p\\";s:3:\\"581\\";}i:12276;a:3:{s:1:\\"s\\";s:1:\\"2\\";s:1:\\"t\\";s:10:\\"2012-11-11\\";s:1:\\"p\\";s:3:\\"123\\";}i:12277;a:3:{s:1:\\"s\\";s:1:\\"2\\";s:1:\\"t\\";s:10:\\"2013-02-16\\";s:1:\\"p\\";s:3:\\"301\\";}}' WHERE option_name = 'ois_stats' made by do_action('wp_ajax_nopriv_ois_ajax'), call_user_func_array, ois_submission_ajax, update_option, referer:

    Is it because of any plugin, theme or it is hosting problem.

    Thank you

  2. Christian
    Member
    Posted 1 year ago #

    Hello,

    Got similar problem (twice this week).
    Need to deactivate W3 Total Cache to fix the issue.

    Using WP3.5.1 and the last version of W3 Total Cache

  3. Ravi Ahuja
    Member
    Posted 1 year ago #

    After deactivating W3 Total Cache my blog is running good but still it is creating log file with the error I have listed above.

  4. wu-wei
    Member
    Posted 1 year ago #

    FYI, this error message is generated by the piece of garbage plugin, OptinSkin and its idiotic use of serialized data.

  5. Keith Aldrich
    Member
    Posted 8 months ago #

    I'm not running OptinSkin, but I'm getting this error...

  6. wu-wei
    Member
    Posted 8 months ago #

    Keith, I was talking about the specific case of the original poster. On a site with many pages, optin skin can generate ridiculous queries with huge blobs of serialized data needing to be written for every request.

    In the general sense, the error message "MySQL server has gone away" can pop up for many reasons but most usually because the server is low on RAM and is swapping to disk, or because MySQL is getting pounded by too many queries, or slow queries that prevent it from finishing before its pool of connections is used up.

    Bumping up the mysql query cache can help. Depending on the demands of your applications, you might be able to improve things by tweaking the config regarding persistent database connections.

  7. MCM
    Member
    Posted 6 months ago #

    Also, getting this error. I use podpress which does thousands of downloads a day, so many inserts/updates of the stats table.

    Also, using 2GB RAM but not much CPU load it seems.

    I do not know what do :(

  8. wu-wei
    Member
    Posted 6 months ago #

    MCM, sounds like your MySQL server is just overloaded. You'll probably need to do some performance tuning (up max connections, or lower connection timeout), or if you don't have access to those things, change to a host that will give you more resources.

    Doing those things is beyond the scope of these forums, I think.

  9. MCM
    Member
    Posted 6 months ago #

    I used this - https://launchpad.net/mysql-tuning-primer and changed some settings based on its feedback and things have improved!

    Error logs clean :)

Topic Closed

This topic has been closed to new replies.

About this Topic