Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    57

    MySQL server has gone away

    Hi,

    I have a dedicated server that I run a video hosting site. Sometimes when people upload files I get the error

    MySQL Query Error: xxx


    SQL error: MySQL server has gone away
    SQL error code: 2006
    Date: xxx

    I have searched the internet and found that most people change the max_allowed_packet

    I changed it also to something like 32MB but still sometimes I get this error.

    Why does this happen? What else do you suggest me to change?

    Thank you

  2. #2
    Join Date
    Dec 2003
    Posts
    934
    go to phpmyadmin and click on status (or issue the command 'show status')
    what all entries do you see in red?
    Primary email: advanced dot programmer at gmail dot com ..

  3. #3
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    57
    I have the following in red:

    Handler_read_rnd
    Handler_read_rnd_next
    Created_tmp_disk_tables
    Opened_tables

    thanks

  4. #4
    Join Date
    Aug 2008
    Location
    Shoreline WA
    Posts
    160

    Server info?

    I was wondering what version of MySQL you were running. Other server specs and OS specs could help as well. I know I have seen that error with much older systems, but it has been a while.
    Jonathan Kinney
    Data Systems Specialist
    Advantagecom Networks, Inc.
    http://www.simplywebhosting.com

  5. #5
    Join Date
    Aug 2008
    Location
    Shoreline WA
    Posts
    160

    PHP?

    Also, from what I am guessing, your clients are using a PHP script to upload files, is that correct? If so, what version of PHP, and what PHP commands are you using to open a MySQL connection? There are all kinds of possible reasons for this error, just trying to get a bit more info just in case I can help.
    Jonathan Kinney
    Data Systems Specialist
    Advantagecom Networks, Inc.
    http://www.simplywebhosting.com

  6. #6
    Join Date
    Aug 2004
    Location
    Tampa, Fl
    Posts
    51
    I don't recall seeing that error before but found this link that describes it pretty well. (too much info to post the entire thing here):

    http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

    It sounds a lot like either the "wait_timeout" value (particularly when your clients are connecting from a WinDoze OS) or, as you mentioned, the "max_allowed_packet".

    The text also describes some ways of troubleshooting the problem. Good luck.

  7. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Related Posts from theWHIR.com

Posting Permissions

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