Skip to Content.
Sympa Menu

en - RE: [sympa-users] error : MySQL server has gone away

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "address@concealed" <address@concealed>, "address@concealed" <address@concealed>
  • Subject: RE: [sympa-users] error : MySQL server has gone away
  • Date: Mon, 25 Apr 2016 22:03:02 +0000

> error : MySQL server has gone away Apr 25 13:42:50 mailserver
sympa[23150]: err

This message appears when a remote MySQL server cuts the connection before
it should.

There are a couple of potential causes for this --

- A very long query, and an intervening firewall. If you have a very long
running query (like about 1 minute), then some firewalls will remove the
state table entry and effectively kill the connection.
- A very long query, and a small local timeout. If the query runs for 1
minute but your client timeout is 20s then you'll get this.
- A server fault. Maybe your mysql server is out of memory or resource
- A very big query, and you have a too small max_allowed_packet . Make sure
your max_allowed_packet is big enough, maybe set it to 50,000,000 in the
my.cnf
- something else

If you have max_allowed_packet set big, then check for slow queries. Have
your mysql server log slow queries with something like
log_slow_queries=/var/log/mysqld.slow.log
long_query_time=2
If you find slow queries, increase resource to your mysql instance -- try
raising query_cache_limit=1M, query_cache_size=32M, key_buffer=256M,
sort_buffer_size=2M, read_buffer_size=2M, myisam_sort_buffer_size=64M (these
values are tuned for a 4G host so YMMV). These settings may also help with
exhausted resources.


Steve

Steve Shipway
T: +64 9 3737 599 ext 86487
E: address@concealed

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.19+.

Top of Page