MySQL error - MySql Server has gone away

Posted on 2012-09-07
Last Modified: 2012-09-07

I have a big union query (30 tables, each tabele has 1 milion records).
When I run the query for only 5 tabels it is ok, but when I try to run for all 30 table I get an error - MySql Server has gone away.

Thank you,
Question by:Qw M
    1 Comment
    LVL 142

    Accepted Solution

    this usually means you need to assign the mysql server more memory:
    increase key_buffer_size + read_buffer_size , restart your mysql server, and it should work better.
    of course, if you can tune the query to perform faster can also help (indexes ...)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now