Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A simple query causing the "the server is gone away" message

Have just got a surprise and would appreciate some suggestions. The simple query below updates a table. I have used it severally without qualms but now it does not work as usual causing the MySQL server to go away. What could be responsible. Thanks.

UPDATE rmc_raw_data 
    INNER
    JOIN handover_main
        ON handover_main.handover_time = rmc_raw_data.rmc_time
        AND handover_main.handover_date = rmc_raw_data.rmc_date
        SET rmc_raw_data.handovers = 'Handover'
like image 418
ibiangalex Avatar asked Dec 10 '25 08:12

ibiangalex


1 Answers

It would be advisable to go through the list here - they have quite useful checklist/instructions on what to check.

It explains what are the most common and some of the less common reasons for the quoted message, how to test for them and where to look.

Normally, in a way it should not have anything to do with your SQL but with settings.

Apart from the first and most obvious reason (timeout) I would also try to establish if the behaviour is the same when query is run through command line client/script, compared to for example running it through php (and/or whatever your environment is), JDBC/ODBC perhaps as well.

If behaviour always the same I would concentrate on the server settings (using the mysql docs).

like image 56
Unreason Avatar answered Dec 11 '25 22:12

Unreason