// MySQL error reference

MySQL error 1159: Got timeout reading communication packets

The server waited longer than net_read_timeout for data from a client in the middle of a command, or a connection sat idle past wait_timeout.

Error number
1159
Name
ER_NET_READ_INTERRUPTED
SQLSTATE
08S01
Category
Connection and client
Error message
Got timeout reading communication packets

What it means

Like 1158, this is usually logged by the server as an aborted connection. A read from the client took longer than net_read_timeout (30 seconds by default), or an idle connection went past wait_timeout, so the server closed it.

Common causes

  • Idle connections left open longer than wait_timeout.
  • Clients that pause mid-command, for example while streaming LOAD DATA LOCAL over a slow link.
  • A slow or congested network.

How to fix it

  1. Check the relevant timeouts.

    SHOW VARIABLES WHERE Variable_name IN ('net_read_timeout', 'wait_timeout');
  2. Raise net_read_timeout for slow uploads, and have connection pools retire connections before wait_timeout.

    SET GLOBAL net_read_timeout = 120;

Related errors

More connection and client errors

The code and message text are from the MySQL 8.4 Error Message Reference. Browse the full MySQL error list or search every database error.

// fewer errors, faster fixes

Work on MySQL in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for MySQL and the other databases you use.