MySQL server has gone away (error 2006) Print

  • Linux, MySQL, plesk
  • 0

When sending an email with attachments in Sugar CRM, we have encountered the following error:

Query Failed:INSERT into emails set id= ... ::MySQL error 2006: MySQL server has gone away

Although this error appeared in this application, others may find they have the same issue with other programs.

Our Fix:

1. Edit my.cnf
2. Under [mysqld] we added:

max_allowed_packet = 64M

Others suggest that you need to add:

wait_timeout = 600

We had no need to.

Where do I find my.cnf?

We found my.cnf in the /etc folder.  Others may find it here:

/etc/mysqld/

How do I find files in linux?

a) Method 1

1. Updatedb or Locate -u
2. Locate filename.ext

b) Method 2

find / -name "filename.txt"

c) Method 3

whereis myfile.txt

Was this answer helpful?

« Back