MySQL Error 2055 (CR_SERVER_LOST_EXTENDED) means the client lost its connection to the MySQL server during or right after the handshake phase.
MySQL Error 2055: CR_SERVER_LOST_EXTENDED occurs when the client loses its TCP connection during the initial handshake. Check network latency, SSL settings, and server timeouts, then reconnect or increase the `net_read_timeout` and `net_write_timeout` values to restore stability.
Lost connection to MySQL server at '%s', system error: %d
Error 2055 surfaces when the client library cannot complete the handshake because the TCP socket closes prematurely. MySQL raises the message: Lost connection to MySQL server at '%s', system error: %d
.
Developers see this error while connecting, during very large result sets, or after long client inactivity.
Ignoring it risks partial transactions, corrupted uploads, and stalled automation jobs.
Network interruptions between client and server immediately drop the TCP session, leaving the handshake unfinished and triggering Error 2055.
Mismatched or invalid SSL/TLS parameters force the server to abort the connection, which the client interprets as a loss.
Low net_read_timeout
, net_write_timeout
, or wait_timeout
values can close idle sessions before the client finishes authentication.
Verify basic connectivity with ping
and telnet host 3306
to rule out firewalls or VPN drops.
Regenerate and align SSL certificates or disable SSL temporarily to confirm whether encryption negotiation causes the disconnect.
Increase timeout variables: SET GLOBAL net_read_timeout = 120;
and SET GLOBAL net_write_timeout = 120;
then reconnect.
Docker containers restart and lose the network bridge - pin container names and add health-checks to restart clients cleanly.
Large SELECT INTO OUTFILE exports stall - add --quick
to mysql client or fetch rows in chunks to keep packets flowing.
VPN drops every 60 seconds - switch to a wired link or configure keep-alive packets with mysql_options(..., MYSQL_OPT_RECONNECT, 1)
.
Keep net_read_timeout
and net_write_timeout
at least 30 seconds above typical network latency spikes.
Use TCP keep-alive at OS level: sysctl -w net.ipv4.tcp_keepalive_time=60
.
In Galaxy, enable connection pooling and automatic reconnect so query execution recovers transparently during brief network glitches.
Error 2013 (CR_SERVER_LOST) appears after a query starts; increase interactive_timeout
to mitigate.
Error 2006 (MySQL server has gone away) usually means the server closed the connection; adjust max_allowed_packet
or restart mysqld.
.
Handshake requires extra round-trips for SSL negotiation. Any mismatch or latency spike may drop the socket, triggering Error 2055.
Automatic retries are safe for read-only queries. For writes, wrap transactions so retries do not duplicate changes.
No. Packet size limits relate to Error 2006. Error 2055 is strictly about lost connectivity during handshake.
Galaxy pools connections, applies sensible timeout defaults, and auto-reconnects idle sessions, reducing the likelihood of Error 2055 during query editing.