MySQL server has gone away - althought it hasn't!

Discussion in 'MySQL' started by grutland, Sep 23, 2011.

  1. #1
    Hi,

    I've got a custom error handler setup which emails me any error messages that come through on my system.
    In the last day I've been bombarded with error messages saying "MySQL server has gone away", but when ever I open the site up there are no issues what so ever.
    I am able to browse through the whole system and retrieve any information.

    Is there any reason why these errors might be happening?

    One thing I thought it might be down to is I did a hard reboot the other day which caused problems with temp file in MySQL, but since then I have restarted MySQL, Apache and done a soft reboot of my server.

    Although, at the same time I might have fixed it and these emails are just very delayed in getting to me.

    Any suggestions would be greatly appreciated.
     
    grutland, Sep 23, 2011 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    There are several reasons for that error to occur.

    You can get more info here.
     
    mastermunj, Sep 23, 2011 IP
  3. grutland

    grutland Active Member

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #3
    Oddly enough I have read this page already, but I can't see any thing that would be causing it.

    There are 2 cronjobs that I'm running which seem to be causing the problems, but when I run them manually I don't get any problems.
    I've had to turn the cronjobs off for now to make sure it is actually them causing the issue.
     
    grutland, Sep 26, 2011 IP
  4. p4guru

    p4guru Active Member

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    73
    #4
    p4guru, Sep 26, 2011 IP
  5. grutland

    grutland Active Member

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #5
    Thankyou very much for the help, I was able to pin point the problem.
    I had a terrible piece of SQL that was returning 25259861 rows instead of just one.
    I was attempting to run this every second or so within a cronjob so not surprised the server went loopy.

    So it looks like it might be the packet too large problem that was causing the server to go away.
     
    grutland, Sep 27, 2011 IP