Common SQL Errors

MySQL Error 19: EE_OPEN_WARNING - How to Fix and Prevent

Galaxy Team
August 5, 2025

The EE_OPEN_WARNING warning means a MySQL process finished while still holding open file descriptors or communication streams, signaling a potential resource leak.

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 EE_OPEN_WARNING (code 19)?

MySQL Error 19: EE_OPEN_WARNING appears when the server reports “Warning: %d files and %d streams are left open.” The message tells you a session or engine failed to close file handles, risking resource exhaustion. Identify the offending connection, close lingering files, then restart or flush tables to clear the warning.

Error Highlights

Typical Error Message

Warning: %d files and %d streams are left open

Error Type

Resource Warning

Language

MySQL

Symbol

EE_OPEN_WARNING

Error Code

19

SQL State

Explanation

Table of Contents

What is MySQL EE_OPEN_WARNING?

The server emits “Warning: %d files and %d streams are left open” when it detects unclosed files or NDB streams after an operation ends. The error code is 19 and the symbolic name is EE_OPEN_WARNING.

The warning is global, not query-specific.

It usually logs to the MySQL or NDB management node error log rather than returning to the client, but it signals a condition you should fix quickly.

Why does it matter?

Unclosed files consume operating-system file descriptors and NDB communication channels.

When the limits are hit, MySQL can refuse new connections, crash, or surface additional errors like “Too many open files.” Preventing leakage keeps the cluster healthy and avoids downtime.

What Causes This Error?

The most common trigger is long-running client sessions or storage-engine threads that forget to close tables or file handles.

Improper shutdowns, aborted transactions, or bugs in user-defined functions can also leak descriptors.

How to Fix EE_OPEN_WARNING

First, locate sessions with many open files using SHOW PROCESSLIST and performance_schema tables. Then close or kill the offending sessions. If internal threads leak files, restarting the node or entire cluster frees the descriptors.

Common Scenarios and Solutions

After bulk-load scripts, EE_OPEN_WARNING may log because LOAD DATA opened many files too quickly.

Running FLUSH TABLES WITH READ LOCK forces MySQL to close table handles without downtime.

In NDB Cluster, node restarts that leave incomplete checkpoints can leak streams. Performing an ALL NODES RESTART or an ndb_mgm –e “restart –i” clears them.

Best Practices to Avoid This Error

Limit table_open_cache, set lower max_connections, and monitor open_file_limit. Use a connection pool with aggressive idle-timeout settings.

In Galaxy, query history helps identify long-running sessions so you can terminate them before leakage grows.

Related Errors and Solutions

EE_LIMIT_EXCEEDED (Error 18) appears when the descriptor ceiling is breached. ER_TOO_MANY_OPEN_FILES warns that the OS limit is reached. Both often follow an untreated EE_OPEN_WARNING and can be fixed with similar cleanup steps.

.

Common Causes

Leaked table file descriptors

Applications that open many tables in a loop without closing them exhaust the table cache and leave descriptors open.

Aborted or uncommitted transactions

Transactions that time out or crash before COMMIT or ROLLBACK may leave files and NDB streams in limbo.

Storage-engine bugs

Old InnoDB or NDB versions occasionally fail to close internal checkpoints, producing persistent EE_OPEN_WARNING entries.

Improper server shutdowns

Kill -9 or power loss interrupts MySQL before it can release file handles, causing warnings on the next startup.

User-defined functions (UDFs)

Poorly written UDFs that use fopen or network sockets without fclose can leak descriptors into the server process.

.

Related Errors

FAQs

How do I know which files are still open?

Query performance_schema.file_instances or use lsof -p $(pidof mysqld) to list open paths and streams.

Can I ignore EE_OPEN_WARNING if the server keeps running?

Ignoring the warning risks hitting hard limits later, leading to connection refusals or crashes. Always investigate.

Is this error specific to NDB Cluster?

It appears most often in NDB but can occur in standalone MySQL when the server or plugins leak descriptors.

Does increasing open_file_limit solve the problem?

It only postpones failure. The root cause is leakage. Identify and close files instead of relying solely on higher limits.

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