Results 1 to 2 of 2

2006 - mysql server has gone away

This is a discussion on 2006 - mysql server has gone away within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi - I'm running oscmax 2. Just recently for categories that are carrying a large number of products (over 200), ...

      
  1. #1
    Active Member
    Join Date
    Aug 2004
    Posts
    117
    Rep Power
    0


    Default 2006 - mysql server has gone away

    Hi -

    I'm running oscmax 2. Just recently for categories that are carrying a large number of products (over 200), when a fellow admin logins via dial-up and goes to view a product listing in the category she sees the following message:

    2006 - mysql server has gone away

    select products_name from products_description where products id = 1834 & language_id = 1

    tep stop

    2006 - mysql server has gone away

    select count (*) as total from session where session_key = xxxxxxxxxxxxxxxxxxxx

    And then after below this she sees the products listed.

    I do not see this from my computer, connecting via cable modem. She also does not see this error when she access categories with fewer products (20 or under).

    Most categories are either 200 or more products or 20 or less products. Not much in between.

    So, I'm thinking this may be a timeout she is hitting via dial-up, that I don't hit via cable modem. Is there a particular setting I should look at increasing? Use cache equals false under admin. The config file is also set with define('USE_PCONNECT', 'false');

    Thanks,
    Barb

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: 2006 - mysql server has gone away

    From what I see is most likely something to do with your server.

    Two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are:

    1. Server timed out and closed the connection. How to fix: check that wait_timeout variable in your mysqld’s my.cnf configuration file is large enough. On Debian: sudo nano /etc/mysql/my.cnf, set wait_timeout to at least 600 seconds (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart. I didn’t check, but the default value for wait_timeout might be around 28800 seconds (8 hours).
    2. Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. You can increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf file. On Debian: sudo nano /etc/mysql/my.cnf, set max_allowed_packet to to something like 64M (you can tweak/decrease this value when error 2006 is gone), then sudo /etc/init.d/mysql restart.



    Basically "MySQL server has gone away" error is caused by a query longer than the max_allowed_packet. Ether the setting is too low - or an SQL query is going wild and is tring to pull too much.
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

Similar Threads

  1. Unknown MySQL Server Host
    By AHB900 in forum osCommerce 2.2 Discussion
    Replies: 2
    Last Post: 08-17-2008, 08:11 PM
  2. 2006 - MySQL server has gone away
    By blioux in forum osCmax v2 Installation issues
    Replies: 3
    Last Post: 01-12-2006, 01:10 PM
  3. Can't connect to MySQL server on '207.44.142.34' (111)???
    By currie_muncher in forum osCommerce 2.2 Installation Help
    Replies: 2
    Last Post: 05-19-2005, 10:08 PM
  4. mysql error - ms2.2 - windows IIS server
    By red_fraggle in forum osCommerce 2.2 Discussion
    Replies: 1
    Last Post: 05-10-2005, 12:08 AM
  5. Install script fails to log into mysql server
    By bjrafferty in forum osCMax v1.7 Installation
    Replies: 7
    Last Post: 06-23-2004, 08:37 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
  •