Databases 5 min read

Resolving MySQL 8 Clone Plugin Restart Failures with Systemd Configuration

This article explains why MySQL 8's clone plugin may report a restart failure (error 3707), analyzes the role of the monitoring process, and provides systemd service configurations—including RestartForceExitStatus=16 and Environment=MYSQLD_PARENT_PID=1—to ensure automatic restarts succeed after clone operations while preventing unwanted restarts in other failure scenarios.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Resolving MySQL 8 Clone Plugin Restart Failures with Systemd Configuration

MySQL 8 introduced a new clone plugin used for distributed recovery in MySQL Group Replication and for physical backup/restore.

During clone operations, after data transfer the server attempts an automatic restart, which may fail with error 3707: "Restart server failed (mysqld is not managed by supervisor process)".

The official documentation explains that the restart requires a monitoring process; the error does not mean the clone failed, only that the automatic restart could not be performed.

Investigation shows the key clues are the RESTART command and the monitoring process. In Unix‑like systems, systemd or mysqld_safe provides this monitoring.

If a custom systemd service is used, the service file must include the proper settings. The default MySQL RPM provides a service file with:

Restart=on-failure

RestartPreventExitStatus=1

# Set environment variable MYSQLD_PARENT_PID. This is required for restart.
Environment=MYSQLD_PARENT_PID=1

To control automatic restarts, especially to avoid unwanted restarts on manual interruptions, the service can be configured to restart only when the exit status is 16 (the code used by the RESTART command):

RestartForceExitStatus=16
RestartPreventExitStatus=1
# Set environment variable MYSQLD_PARENT_PID. This is required for restart.
Environment=MYSQLD_PARENT_PID=1

With this configuration, MySQL will automatically restart after a successful clone operation, while other failure scenarios will not trigger an automatic restart.

Images in the original article illustrate the error messages and the successful restart after applying the configuration.

MySQLDatabase OperationsClone PluginsystemdRestart Failure
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.