# net_read_timeout

> Seconds the server waits for more data from a client before aborting the read.

Source: https://sqlly.app/sql-configuration/mysql/net-read-timeout
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).

**Default**

`30`

**Range**

1 to 31536000 seconds

**Restart needed**

No

**Default checked on**

MySQL 8.4 LTS

## What it does

It applies whenever the server is reading from the client: a statement arriving in several packets, or the data behind a LOAD DATA LOCAL. If the next block does not arrive within the limit the connection is dropped, which clients report as 'Lost connection to MySQL server during query'.

## Default value

`30`. 30 seconds (MySQL 8.4).

## Check the current value

```
SHOW GLOBAL VARIABLES LIKE 'net_read_timeout';

SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME
FROM performance_schema.variables_info
WHERE VARIABLE_NAME = 'net_read_timeout';
```

## Change it

```
SET SESSION net_read_timeout = 600;   -- this connection
SET GLOBAL net_read_timeout = 600;    -- new connections, until restart
SET PERSIST net_read_timeout = 600;   -- new connections, and after restarts
```

No restart. SET GLOBAL (or SET PERSIST, which also survives restarts) applies to connections opened afterwards; existing connections keep their session value unless they SET it themselves.

## When to change it

When a bulk loader or a client on a slow link sends very large statements in pieces and connections keep dying mid-send.

## What can go wrong

Raising it globally keeps half-dead connections, each with a thread and its buffers, alive for the whole limit. A value that has to be huge usually points at a network problem or a client writing data in dribbles; find that instead of stretching the timeout for everyone.

## Questions about net_read_timeout

### What is the default value of net_read_timeout in MySQL?

30. 30 seconds (MySQL 8.4).

### Does changing net_read_timeout require a restart?

No. No restart. SET GLOBAL (or SET PERSIST, which also survives restarts) applies to connections opened afterwards; existing connections keep their session value unless they SET it themselves.

### When should I change net_read_timeout?

When a bulk loader or a client on a slow link sends very large statements in pieces and connections keep dying mid-send.

Back to all [MySQL settings](https://sqlly.app/sql-configuration/mysql), or check the [MySQL manual](https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html) for every option.

## Related MySQL settings

- [`net_write_timeout` Seconds the server waits writing a block to a client before aborting.](https://sqlly.app/sql-configuration/mysql/net-write-timeout)
- [`wait_timeout` Seconds a non-interactive connection may sit idle before the server closes it.](https://sqlly.app/sql-configuration/mysql/wait-timeout)
- [`connect_timeout` Seconds the server waits for a client to answer the handshake.](https://sqlly.app/sql-configuration/mysql/connect-timeout)

## Related on SQLly

- [Diagnosing a slow SQL query Performance guide](https://sqlly.app/sql-performance/slow-query)
