Common SQL Errors

MySQL Error 1620 WARN_PLUGIN_BUSY: Plugin is busy and will be uninstalled on shutdown - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>MySQL raises error 1620 WARN_PLUGIN_BUSY when an UNINSTALL PLUGIN or shutdown request finds the plugin still in active use.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1620 WARN_PLUGIN_BUSY?

<p>MySQL Error 1620: WARN_PLUGIN_BUSY occurs when you try to uninstall a plugin that still has active threads. Wait for, or manually stop, the plugin processes, then run UNINSTALL PLUGIN again or restart MySQL to clear the lock.</p>

Error Highlights

Typical Error Message

Plugin is busy and will be uninstalled on shutdown

Error Type

Plugin Error

Language

MySQL

Symbol

WARN_PLUGIN_BUSY

Error Code

1620

SQL State

HY000

Explanation

Table of Contents

What is MySQL error 1620 WARN_PLUGIN_BUSY?

MySQL error 1620, condition name WARN_PLUGIN_BUSY, is emitted when a plugin cannot be uninstalled immediately because its internal thread or resource is still active. The server logs Plugin is busy and will be uninstalled on shutdown and keeps the plugin registered until it is safe to release.

The warning surfaces during UNINSTALL PLUGIN, VERSION upgrades, or server shutdowns. Although tagged as a warning, it blocks the requested operation and can extend maintenance windows, so resolving it promptly is important.

What Causes This Error?

MySQL returns WARN_PLUGIN_BUSY when a plugin thread, lock, or background job remains active while an administrator calls UNINSTALL PLUGIN or executes shutdown. The busy state prevents the dynamic loader from freeing shared libraries.

Long-running audit, authentication, memcached, or custom plugins frequently hold open resources. If a plugin starts background workers or listens on sockets, those threads must finish before removal is allowed.

How to Fix MySQL Error 1620

First, identify which plugin is busy with SHOW PLUGINS or queries against PERFORMANCE_SCHEMA. Next, disable or stop the plugin’s workload, then retry UNINSTALL PLUGIN. If the plugin will not release, restart MySQL to force unload at shutdown.

In production, place the server into read-only mode before stopping plugins to reduce new connections and jobs that could prolong the busy state.

Common Scenarios and Solutions

Administrators often see WARN_PLUGIN_BUSY when removing an auditing plugin after enabling general log capture. Flushing logs and closing sessions frees the plugin so UNINSTALL succeeds.

In replication setups, the semi-sync plugin can show as busy because it waits for acknowledgments. Temporarily disable semisync settings, wait for seconds_behind_master to reach zero, then uninstall.

Best Practices to Avoid This Error

Always stop plugin activity gracefully before uninstalling. Provide a short maintenance window, set super_read_only, and kill idle sessions using the plugin.

Monitor INFORMATION_SCHEMA.PLUGINS and PERFORMANCE_SCHEMA.EVENTS_WAITS_HISTORY to detect plugins that keep long-running locks. Automate shutdown scripts to check busy status before attempting removal.

Related Errors and Solutions

Error 1125 HY000 Operation cannot be performed - appears when a plugin lacks privileges. Grant required permissions or install with --skip-grant-tables.

Error 1126 HY000 Can’t open shared library - occurs when a plugin binary is missing. Verify plugin_dir path and file permissions.

Common Causes

Active Plugin Threads

Background workers spawned by the plugin are still running when UNINSTALL PLUGIN is issued.

Open Connections Using Plugin Features

Client sessions continue to call plugin functions, keeping the plugin locked in memory.

Long-Running Transactions

Transactions started through audit or auth plugins delay plugin unload until commit or rollback.

Replication or Semi-Sync Dependencies

Replication plugins wait for ACKs from slaves, marking themselves busy until the handshake finishes.

Related Errors

MySQL Error 1126: Can't open shared library

The server cannot locate the plugin binary. Confirm plugin_dir and file permissions.

MySQL Error 1125: Operation cannot be performed

The current user lacks privileges to install or uninstall plugins. Grant INSERT, DELETE, and UPDATE on mysql.plugin.

MySQL Error 1517: Plugin not found

UNINSTALL PLUGIN specifies a name not present in mysql.plugin. Verify the spelling and case sensitivity.

FAQs

Is WARN_PLUGIN_BUSY a fatal error?

No. It is a warning but blocks plugin removal until the plugin becomes idle or the server restarts.

Can I ignore the warning and continue production?

Yes, but the plugin will stay loaded. For upgrades or clean rollbacks, clear the busy state first.

How long should I wait before forcing a restart?

If draining connections takes more than a few minutes in maintenance windows, restart to unload safely.

Does Galaxy help diagnose busy plugins?

Galaxy’s editor lets you run SHOW PLUGINS and PERFORMANCE_SCHEMA queries quickly, share results, and endorse fix scripts for repeatable maintenance.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo