<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="replica-io-thread-states">
      </a>
      10.14.5 Replication I/O (Receiver) Thread States
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045221264016">
  </a>
  <a class="indexterm" name="idm46045221262528">
  </a>
  <p>
   The following list shows the most common states you see in the
   <code class="literal">
    State
   </code>
   column for a replication I/O (receiver)
        thread on a replica server. This state also appears in the
   <code class="literal">
    Replica_IO_State
   </code>
   column displayed by
   <a class="link" href="show-replica-status.html" title="15.7.7.35 SHOW REPLICA STATUS Statement">
    <code class="literal">
     SHOW
        REPLICA STATUS
    </code>
   </a>
   , so you can get a good view of what is
        happening by using that statement.
  </p>
  <p>
   In MySQL 8.0, incompatible changes were made to instrumentation
        names. Monitoring tools that work with these instrumentation
        names might be impacted. If the incompatible changes have an
        impact for you, set the
   <a class="link" href="replication-options-replica.html#sysvar_terminology_use_previous">
    <code class="literal">
     terminology_use_previous
    </code>
   </a>
   system
        variable to
   <code class="literal">
    BEFORE_8_0_26
   </code>
   to make MySQL
        Server use the old versions of the names for the objects
        specified in the previous list. This enables monitoring tools
        that rely on the old names to continue working until they can be
        updated to use the new names.
  </p>
  <p>
   Set the
   <a class="link" href="replication-options-replica.html#sysvar_terminology_use_previous">
    <code class="literal">
     terminology_use_previous
    </code>
   </a>
   system
        variable with session scope to support individual functions, or
        global scope to be a default for all new sessions. When global
        scope is used, the slow query log contains the old versions of
        the names.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221251376">
      </a>
      <a class="indexterm" name="idm46045221249888">
      </a>
      <code class="literal">
       Checking master version
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221247328">
      </a>
      <a class="indexterm" name="idm46045221245840">
      </a>
      <code class="literal">
       Checking source version
      </code>
     </p>
     <p>
      A state that occurs very briefly, after the connection to
            the source is established.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221242368">
      </a>
      <a class="indexterm" name="idm46045221240880">
      </a>
      <code class="literal">
       Connecting to master
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221238320">
      </a>
      <a class="indexterm" name="idm46045221236832">
      </a>
      <code class="literal">
       Connecting to source
      </code>
     </p>
     <p>
      The thread is attempting to connect to the source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221233408">
      </a>
      <a class="indexterm" name="idm46045221231904">
      </a>
      <code class="literal">
       Queueing master event to the relay log
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221229312">
      </a>
      <a class="indexterm" name="idm46045221227808">
      </a>
      <code class="literal">
       Queueing source event to the relay log
      </code>
     </p>
     <p>
      The thread has read an event and is copying it to the relay
            log so that the SQL thread can process it.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221224288">
      </a>
      <a class="indexterm" name="idm46045221222768">
      </a>
      <code class="literal">
       Reconnecting after a failed binlog dump
            request
      </code>
     </p>
     <p>
      The thread is trying to reconnect to the source.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221219264">
      </a>
      <a class="indexterm" name="idm46045221217744">
      </a>
      <code class="literal">
       Reconnecting after a failed master event
            read
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221215104">
      </a>
      <a class="indexterm" name="idm46045221213584">
      </a>
      <code class="literal">
       Reconnecting after a failed source event
            read
      </code>
     </p>
     <p>
      The thread is trying to reconnect to the source. When
            connection is established again, the state becomes
      <code class="literal">
       Waiting for master to send event
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221209280">
      </a>
      <a class="indexterm" name="idm46045221207776">
      </a>
      <code class="literal">
       Registering slave on master
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221205184">
      </a>
      <a class="indexterm" name="idm46045221203680">
      </a>
      <code class="literal">
       Registering replica on source
      </code>
     </p>
     <p>
      A state that occurs very briefly after the connection to the
            source is established.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221200192">
      </a>
      <a class="indexterm" name="idm46045221198704">
      </a>
      <code class="literal">
       Requesting binlog dump
      </code>
     </p>
     <p>
      A state that occurs very briefly, after the connection to
            the source is established. The thread sends to the source a
            request for the contents of its binary logs, starting from
            the requested binary log file name and position.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221195072">
      </a>
      <a class="indexterm" name="idm46045221193568">
      </a>
      <code class="literal">
       Waiting for its turn to commit
      </code>
     </p>
     <p>
      A state that occurs when the replica thread is waiting for
            older worker threads to commit if
      <a class="link" href="replication-options-replica.html#sysvar_replica_preserve_commit_order">
       <code class="literal">
        replica_preserve_commit_order
       </code>
      </a>
      is enabled.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221188768">
      </a>
      <a class="indexterm" name="idm46045221187264">
      </a>
      <code class="literal">
       Waiting for master to send event
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221184672">
      </a>
      <a class="indexterm" name="idm46045221183168">
      </a>
      <code class="literal">
       Waiting for source to send event
      </code>
     </p>
     <p>
      The thread has connected to the source and is waiting for
            binary log events to arrive. This can last for a long time
            if the source is idle. If the wait lasts for
      <a class="link" href="replication-options-replica.html#sysvar_replica_net_timeout">
       <code class="literal">
        replica_net_timeout
       </code>
      </a>
      seconds, a timeout occurs. At that point, the thread
            considers the connection to be broken and makes an attempt
            to reconnect.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221178112">
      </a>
      <a class="indexterm" name="idm46045221176656">
      </a>
      <code class="literal">
       Waiting for master update
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221174064">
      </a>
      <a class="indexterm" name="idm46045221172560">
      </a>
      <code class="literal">
       Waiting for source update
      </code>
     </p>
     <p>
      The initial state before
      <code class="literal">
       Connecting to
            master
      </code>
      or
      <code class="literal">
       Connecting to source
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221167696">
      </a>
      <a class="indexterm" name="idm46045221166192">
      </a>
      <code class="literal">
       Waiting for slave mutex on exit
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221163600">
      </a>
      <a class="indexterm" name="idm46045221162096">
      </a>
      <code class="literal">
       Waiting for replica mutex on exit
      </code>
     </p>
     <p>
      A state that occurs briefly as the thread is stopping.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221158640">
      </a>
      <a class="indexterm" name="idm46045221157104">
      </a>
      <code class="literal">
       Waiting for the slave SQL thread to free enough
            relay log space
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221154432">
      </a>
      <a class="indexterm" name="idm46045221152896">
      </a>
      <code class="literal">
       Waiting for the replica SQL thread to free enough
            relay log space
      </code>
     </p>
     <p>
      You are using a nonzero
      <a class="link" href="replication-options-replica.html#sysvar_relay_log_space_limit">
       <code class="literal">
        relay_log_space_limit
       </code>
      </a>
      value, and the relay logs have grown large enough that their
            combined size exceeds this value. The I/O (receiver) thread
            is waiting until the SQL (applier) thread frees enough space
            by processing relay log contents so that it can delete some
            relay log files.
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221147760">
      </a>
      <a class="indexterm" name="idm46045221146240">
      </a>
      <code class="literal">
       Waiting to reconnect after a failed binlog dump
            request
      </code>
     </p>
     <p>
      If the binary log dump request failed (due to
            disconnection), the thread goes into this state while it
            sleeps, then tries to reconnect periodically. The interval
            between retries can be specified using the
      <a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
       <code class="literal">
        CHANGE REPLICATION SOURCE TO
       </code>
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="indexterm" name="idm46045221141312">
      </a>
      <a class="indexterm" name="idm46045221139792">
      </a>
      <code class="literal">
       Waiting to reconnect after a failed master event
            read
      </code>
     </p>
     <p>
      <a class="indexterm" name="idm46045221137152">
      </a>
      <a class="indexterm" name="idm46045221135632">
      </a>
      <code class="literal">
       Waiting to reconnect after a failed source event
            read
      </code>
     </p>
     <p>
      An error occurred while reading (due to disconnection). The
            thread is sleeping for the number of seconds set by the
      <a class="link" href="change-replication-source-to.html" title="15.4.2.2 CHANGE REPLICATION SOURCE TO Statement">
       <code class="literal">
        CHANGE REPLICATION SOURCE TO
       </code>
      </a>
      statement before attempting to reconnect.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
