# Replica I/O Thread States

This article documents thread states that are related to [replica](/docs/server/ha-and-performance/standard-replication/replication-overview.md) I/O threads. These correspond to the `Slave_IO_State` shown by [SHOW REPLICA STATUS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-replica-status.md) and the `STATE` values listed by the [SHOW PROCESSLIST](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-processlist.md) statement or in the [Information Schema PROCESSLIST Table](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-processlist-table.md) as well as the `PROCESSLIST_STATE` value listed in the [Performance Schema threads Table](/docs/server/reference/system-tables/performance-schema/performance-schema-tables/performance-schema-threads-table.md).

| Value                                                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Checking master version                                          | Checking the primary's version, which only occurs very briefly after establishing a connection with the primary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Connecting to master                                             | Attempting to connect to primary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Queueing master event to the relay log                           | Event is being copied to the [relay log](/docs/server/server-management/server-monitoring-logs/binary-log/relay-log.md) after being read, where it can be processed by the SQL thread.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Reconnecting after a failed binlog dump request                  | Attempting to reconnect to the primary after a previously failed binary log dump request.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Reconnecting after a failed master event read                    | Attempting to reconnect to the primary after a previously failed request. After successfully connecting, the state will change to Waiting for master to send event.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Registering slave on master                                      | Registering the replica on the primary, which only occurs very briefly after establishing a connection with the primary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Requesting binlog dump                                           | Requesting the contents of the binary logs from the given log file name and position. Only occurs very briefly after establishing a connection with the primary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Waiting for master to send event                                 | Waiting for [binary log](/docs/server/server-management/server-monitoring-logs/binary-log.md) events to arrive after successfully connecting. If there are no new events on the primary, this state can persist for as many seconds as specified by the [slave\_net\_timeout](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md) system variable, after which the thread will reconnect. Prior to [MariaDB 10.6.18](/docs/release-notes/community-server/10.6/10.6.18.md), [MariaDB 10.11.8](/docs/release-notes/community-server/10.11/10.11.8.md), [MariaDB 11.0.6](/docs/release-notes/community-server/old-releases/11.0/11.0.6.md), [MariaDB 11.1.5](/docs/release-notes/community-server/old-releases/11.1/11.1.5.md), [MariaDB 11.2.4](/docs/release-notes/community-server/old-releases/11.2/11.2.4.md) and [MariaDB 11.4.2](/docs/release-notes/community-server/11.4/11.4.2.md), the time was from SLAVE START. From these versions, the time is since reading the last event. |
| Waiting for slave mutex on exit                                  | Waiting for replica mutex while the thread is stopping. Only occurs very briefly.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Waiting for the slave SQL thread to free enough relay log space. | [Relay log](/docs/server/server-management/server-monitoring-logs/binary-log/relay-log.md) has reached its maximum size, determined by [relay\_log\_space\_limit](/docs/server/ha-and-performance/standard-replication/replication-and-binary-log-system-variables.md) (no limit by default), so waiting for the SQL thread to free up space by processing enough relay log events.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Waiting for master update                                        | State before connecting to primary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Waiting to reconnect after a failed binlog dump request          | Waiting to reconnect after a binary log dump request has failed due to disconnection. The length of time in this state is determined by the MASTER\_CONNECT\_RETRY clause of the [CHANGE MASTER TO](/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/change-master-to.md) statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Waiting to reconnect after a failed master event read            | Sleeping while waiting to reconnect after a disconnection error. The time in seconds is determined by the MASTER\_CONNECT\_RETRY clause of the [CHANGE MASTER TO](/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/change-master-to.md) statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/buffers-caches-and-threads/thread-states/replica-io-thread-states.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
