Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Old issue with "server has gone away for query"?

  1. #1
    Rarst's Avatar
    Rarst is offline Big Tipper
    Join Date
    Jul 2009
    Posts
    322

    Icon5 Old issue with "server has gone away for query"?

    I have been getting occasional 404 errors on perfectly normal links. After recent debug tweaks I logged hundred of PHP errors that all say
    Code:
    "WordPress database error MySQL 
    server has gone away for query"
    and happen at the same time as those 404.

    Hosting support as usual said that everything seems fine and MySQL server might get overloaded - they will monitor for that. They had never ever got back to me after they said they are monitoring something. :(

    I googled around and there is some really old stuff on topic:
    http://robsnotebook.com/wordpress-mysql-gone-away
    http://wordpress.org/support/topic/110182

    Had anyone encountered this? Is that core hack only viable method to solve issue known?

    Related MySQL settings at server - 1MB max query size, 50s wait timeout.
    Rarst.net - cynical thoughts on software and web (and sometimes WP) | @Rarst | I seem to be non-GPL-compliant person. Beware my poisonous thoughts.

  2. #2
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,358

    Default

    Can't say I've ever come across something like that with WPTavern.com.

  3. #3
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    Yeah, I'm thinking their MySQL server is going down.

  4. #4
    Rarst's Avatar
    Rarst is offline Big Tipper
    Join Date
    Jul 2009
    Posts
    322

    Default

    If server is down shouldn't there also be some failed connection errors and that blank "Error establishing database connection" page?

    Since it only seems to happen for short amounts of time I try to decide if it's worth it to use those hacks from first link for longer timeouts and reconnection attempts.
    Rarst.net - cynical thoughts on software and web (and sometimes WP) | @Rarst | I seem to be non-GPL-compliant person. Beware my poisonous thoughts.

  5. #5
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    862

    Default

    "MySQL server has gone away" is a generic error. It happens when the connection between the site and the database times out and the connection auto-closes.

    Primary cause: Seriously overloaded database server.

    Secondary cause: The mysql server restarted, killing all current connections in the process.

    Other possible causes:
    - Stupid configuration. Usually due to stupid sysadmin.
    - You sent a query that was too large. The default max query size is 1 MB, so this is unlikely.
    - DNS failure. mysql relies on name resolution, it can't tell the difference between network timeout and DNS being borked.
    - mysql bug. Not uncommon, but rare to see in real life usage.
    - Your tables got horked up in a way that actually crashes mysql when it tries to access them. Rare, but possible.

  6. #6
    Rarst's Avatar
    Rarst is offline Big Tipper
    Join Date
    Jul 2009
    Posts
    322

    Default

    Primary cause: Seriously overloaded database server.

    Secondary cause: The mysql server restarted, killing all current connections in the process.
    Hmm... If errors come in cluster once or twice a day and works fine rest of the time I guess it looks more like second?

    I won't rule out stupid configuration (sigh), rest seems unlikely. Database on same server, 1MB query indeed and some plenty of failed queries are short, generic WordPress with minimal amount of non-standard tables.

    Question stands - should I live with it or should I try to tweak WP so it handles these micro-outages better?

    PS I am so looking for new host later this year
    Rarst.net - cynical thoughts on software and web (and sometimes WP) | @Rarst | I seem to be non-GPL-compliant person. Beware my poisonous thoughts.

  7. #7
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,358

    Default

    I still think you should figure out if the problem is with the host/mysql server or WordPress. Could it not be possible that WordPress is just fine and it's your host causing the problems?

  8. #8
    Rarst's Avatar
    Rarst is offline Big Tipper
    Join Date
    Jul 2009
    Posts
    322

    Default

    Quote Originally Posted by Jeffro View Post
    I still think you should figure out if the problem is with the host/mysql server or WordPress. Could it not be possible that WordPress is just fine and it's your host causing the problems?
    Well, it appears sporadically, during normal WordPress operation (I am not doing anything in admin area or whatever) and seems to coincide with high server load (hard to tell with limited cpanel monitoring).

    From googling it seems like relatively common WordPress issue, but more tied to host performance than WP itself.

    I already posted about server issues some time ago... Guess it's really time to research and bolt from this host. :)
    Rarst.net - cynical thoughts on software and web (and sometimes WP) | @Rarst | I seem to be non-GPL-compliant person. Beware my poisonous thoughts.

  9. #9
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    and seems to coincide with high server load
    Yes, it's the host. :D Move.

  10. #10
    Rarst's Avatar
    Rarst is offline Big Tipper
    Join Date
    Jul 2009
    Posts
    322

    Default

    Got to my Pingdom account. I get downtimes notifications, but not for server being slow. Response times are not a pretty sight :(



    PS errors log clicked up to ~7000 overnight
    Last edited by Rarst; 02-23-2010 at 01:29 AM.
    Rarst.net - cynical thoughts on software and web (and sometimes WP) | @Rarst | I seem to be non-GPL-compliant person. Beware my poisonous thoughts.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •