Professional Web Applications Themes

ERROR 2006 (HY000): MySQL server has gone away - MySQL

Hi, I'm encountering the Error #2006 when inserting data into a table (ERROR 2006 (HY000): MySQL server has gone away). Each time after the same amount of rows have been successfully added the mysql client window shows me this error. The mysql client then tries to reconnect but with the same error message. I already set: max_allowed_packet=16M; delayed_insert_timeout=10000; connect_timeout=100000; as it was suggested in some newsgroups. But with the same result. I'm using 5.0.37 on a XP-box. Any ideas what might go wrong? -- Matthias Wirtz - Karlsruhe, DE...

  1. #1

    Default ERROR 2006 (HY000): MySQL server has gone away

    Hi,

    I'm encountering the Error #2006 when inserting data into a table (ERROR
    2006 (HY000): MySQL server has gone away). Each time after the same amount
    of rows have been successfully added the mysql client window shows me this
    error.

    The mysql client then tries to reconnect but with the same error message.

    I already set:
    max_allowed_packet=16M;
    delayed_insert_timeout=10000;
    connect_timeout=100000;

    as it was suggested in some newsgroups. But with the same result.

    I'm using 5.0.37 on a XP-box.

    Any ideas what might go wrong?
    --
    Matthias Wirtz - Karlsruhe, DE


    Matthias Guest

  2. #2

    Default Re: ERROR 2006 (HY000): MySQL server has gone away

    Matthias Wirtz wrote: 

    a couple of things:
    1-are you sure you don't have any corruption in any of your data files (
    in the data dir)
    2-can you post the 50 last lines of your error file (generated by mysql)

    --
    lark -- net
    To reply to me directly, delete "despam".
    lark Guest

  3. #3

    Default Re: ERROR 2006 (HY000): MySQL server has gone away

    "lark" <net> schrieb im Newsbeitrag
    news:eVn_h.187$news.prodigy.net... 
     [/ref]
     

    I had the table files checked with myisamchk and everything is ok. Or did
    you mean to use a windows tool on file level to find any corruption?
     

    I'm not sure which log file you are referencing to. There is a
    [computername].err file generated in the data folder of my MySQL
    installation. The last couple of lines look like this:

    ----------
    070427 16:24:51 InnoDB: Started; log sequence number 0 46291
    070427 16:24:51 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    ready for connections.
    Version: '5.0.37-community-nt' socket: '' port: 3306 MySQL Community
    Edition (GPL)
    070427 17:09:18 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    Normal shutdown

    070427 17:09:21 InnoDB: Starting shutdown...
    070427 17:09:24 InnoDB: Shutdown completed; log sequence number 0 46291
    070427 17:09:24 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    Shutdown complete

    070503 11:50:52 InnoDB: Started; log sequence number 0 46291
    070503 11:50:53 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    ready for connections.
    Version: '5.0.37-community-nt' socket: '' port: 3306 MySQL Community
    Edition (GPL)
    ----------

    Looks ok to me. If there is another log file I should have a look at let me
    know.
    --
    Matthias Wirtz - Karlsruhe, DE


    Matthias Guest

  4. #4

    Default Re: ERROR 2006 (HY000): MySQL server has gone away

    Matthias Wirtz wrote: 
    > [/ref]

    >
    > I had the table files checked with myisamchk and everything is ok. Or did
    > you mean to use a windows tool on file level to find any corruption?

    >
    > I'm not sure which log file you are referencing to. There is a
    > [computername].err file generated in the data folder of my MySQL
    > installation. The last couple of lines look like this:
    >
    > ----------
    > 070427 16:24:51 InnoDB: Started; log sequence number 0 46291
    > 070427 16:24:51 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    > ready for connections.
    > Version: '5.0.37-community-nt' socket: '' port: 3306 MySQL Community
    > Edition (GPL)
    > 070427 17:09:18 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    > Normal shutdown
    >
    > 070427 17:09:21 InnoDB: Starting shutdown...
    > 070427 17:09:24 InnoDB: Shutdown completed; log sequence number 0 46291
    > 070427 17:09:24 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    > Shutdown complete
    >
    > 070503 11:50:52 InnoDB: Started; log sequence number 0 46291
    > 070503 11:50:53 [Note] C:\Programme\MySQL\MySQL Server 5.0\bin\mysqld-nt:
    > ready for connections.
    > Version: '5.0.37-community-nt' socket: '' port: 3306 MySQL Community
    > Edition (GPL)
    > ----------
    >
    > Looks ok to me. If there is another log file I should have a look at let me
    > know.[/ref]

    you're right! there's nothing wrong at the server level and it appears
    your data files are not corrupted either. so i dug in bugzilla a little
    bit and found this from the logs:

    if you send a query (specially via compressed packets) to the server
    that is larger than the max_allowed_packet, it drops the connection
    without providing a good error message. A packet too large is handled
    the same way as a bogus packet - there's no knowing if the connection is
    still good or what is going on, so the easiest way for the server is
    just to drop the connection and move along.

    from Monty himself:
    The easy way to avoid this problem is to ensure that max_allowed_packet
    is set bigger in the mysqld server than in the client and that all
    clients uses the same value for max_allowed_packet.


    here's what i recommend, increase the value of max_allowed_packet at the
    server level to 128M but leave the other two what they are. then
    increase the value of the same variable in all of your clients to 32M or
    even 64M and see what happens.

    let us know of the results.


    --
    lark -- net
    To reply to me directly, delete "despam".
    lark Guest

  5. #5

    Default Re: ERROR 2006 (HY000): MySQL server has gone away

    "lark" <net> wrote in
    news:%HG_h.18$news.prodigy.net...
     [/ref][/ref]
     

    Yes, now it's working.

    I set the max_allowed_packet parameter not only in the mysql-client window
    by specifying:

    set session max_allowed_packet=16000000;

    but also in the my.ini config file.

    Looks very much like this was the problem. Thanks for your help.
    --
    Matthias Wirtz - Karlsruhe, DE


    Matthias Guest

Similar Threads

  1. Replies: 5
    Last Post: September 12th, 10:46 PM
  2. Replies: 1
    Last Post: June 7th, 01:23 AM
  3. Replies: 0
    Last Post: January 29th, 02:03 PM
  4. Invalid Index Descriptor Error#07009 & HY000
    By Josh_und in forum Coldfusion Database Access
    Replies: 0
    Last Post: May 24th, 08:27 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139