Connection 'going away' problems

Posted on 2011-10-06
Last Modified: 2012-05-12
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    4688
Current database: foo_bar

is the constant complaint of this db. I mean the query succeeds but that phenomenon is at least irritating. How to stop it?

Perhaps it's something to do with the settings? Please see attached file.
Question by:CEHJ
    LVL 3

    Expert Comment

    This problem is often because you have to small resources to run the Mysql server
    But this is a sample configuration that might help


    port       = 3306
    socket       = /tmp/mysql.sock
    key_buffer = 384M
    max_allowed_packet = 64M
    table_cache = 4096
    sort_buffer_size = 2M
    read_buffer_size = 2M
    read_rnd_buffer_size = 64M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size = 32M

    This can also be a problem that you are running a to old version of Mysql with a 3:d party application (like drupal perhaps?) that require a more modern version of Mysql then you are running

    Hope it helps
    LVL 86

    Author Comment

    >>This problem is often because you have to small resources to run the Mysql server

    I have around 3GB ram, plenty of disk space and the dbs total about 225MB in size.  The version is  5.0.92-community
    LVL 3

    Accepted Solution

    Alright then you should not have much of a problem if not the timeouts are very short? This is a quite good guide to fault search this problem.. it's a hassle to find but it have helped me in the past

    LVL 86

    Author Closing Comment


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now