Common SQL Errors

MySQL Error 37: EE_FAILED_TO_DELETE_TIMER - How to Fix and Prevent

Galaxy Team
August 5, 2025

MySQL error 37 (EE_FAILED_TO_DELETE_TIMER) means the server could not remove an internal timer file because the operating system returned an error.

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 37?

MySQL Error 37: EE_FAILED_TO_DELETE_TIMER occurs when the server fails to delete an internal timer file, usually due to file-system permissions or locks. Restore file access rights, release locks, and restart the Event Scheduler to resolve the issue.

Error Highlights

Typical Error Message

Failed to delete timer (OS errno %d). EE_FAILED_TO_DELETE_TIMER was added in 8.0.13.

Error Type

System Error

Language

MySQL

Symbol

EE_FAILED_TO_DELETE_TIMER

Error Code

37

SQL State

Explanation

Table of Contents

What is MySQL Error 37 EE_FAILED_TO_DELETE_TIMER?

MySQL raises error 37 with the condition name EE_FAILED_TO_DELETE_TIMER when it cannot delete an internal timer file. The accompanying OS errno pinpoints the underlying operating-system problem.

This global internal error was introduced in MySQL 8.0.13 and typically appears in the error log, not directly to clients.

It signals cleanup failure inside the Event Scheduler or replication timer subsystem.

What Causes This Error?

File-system permission issues prevent mysqld from deleting timer files stored in its data directory.

Read-only mounts and restrictive SELinux or AppArmor profiles frequently trigger the problem.

Lingering file handles from antivirus programs, backup agents, or crashed mysqld processes can lock the timer file, leading to deletion failure and error 37.

Disk-space exhaustion or inode exhaustion also cause the operating system to deny delete operations, surfacing the EE_FAILED_TO_DELETE_TIMER error.

How to Fix MySQL Error 37 EE_FAILED_TO_DELETE_TIMER

First, identify the exact file and OS errno in your MySQL error log.

Cross-reference the errno with your operating system documentation for precise meaning.

Restore correct ownership and 660 permissions on the MySQL data directory. Ensure mysqld runs as the same user that owns the files.

Stop any process that may hold open handles on the timer file.

On Linux, use lsof | grep .timer to locate locks, then terminate or restart those processes.

Common Scenarios and Solutions

Running MySQL inside a Docker container with a bind-mounted data directory set to read-only often blocks delete calls. Remount with read-write to clear the error.

After an unclean shutdown, orphaned files may remain locked by a zombie mysqld process.

Kill the old PID and rerun mysqladmin shutdown before restarting.

Enterprise backup agents scanning the data directory can race with mysqld deletes. Configure path exclusions or pause scans during maintenance windows.

Best Practices to Avoid This Error

Always run mysqld with least-privilege but adequate write permissions to its data directory. Keep SELinux profiles in enforcing mode with an updated policy.

Monitor disk usage and inode counts.

Automated alerts via Galaxy or other monitoring tools let you react before deletes start failing.

Schedule backups and antivirus scans outside peak maintenance periods to minimize file-handle contention with the Event Scheduler.

Related Errors and Solutions

EE_FAILED_TO_CREATE_TIMER (code 36) indicates failure to create the timer file rather than delete it. Verify free space and permissions similarly.

ER_EVENT_SCHEDULER_RUNNING signals that the Event Scheduler could not stop. Killing lingering events and restarting the scheduler usually resolves it.

.

Common Causes

Permission Mismatch

The mysqld process lacks write privileges on the data directory because files were created by root or another user.

Read-Only Filesystem

A Docker bind mount or cloud block storage was mounted read-only, so delete operations fail.

File Lock by External Process

Backup, antivirus, or log shipping tools hold an open handle on the timer file, preventing its removal.

Disk or Inode Exhaustion

No free space or inodes cause the OS to deny deletion, reporting an error that MySQL surfaces as EE_FAILED_TO_DELETE_TIMER.

.

Related Errors

FAQs

Does error 37 affect query results?

No. It is an internal cleanup error. Your running queries continue, but event execution may lag.

Is a full server restart required?

Not always. Fix permissions or file locks, then toggle the Event Scheduler. Restart only if locks persist.

Where are timer files stored?

Timer files reside in the MySQL data directory alongside ibdata files and binary logs.

Can Galaxy detect this error automatically?

Yes. Galaxy’s error log integration flags EE_FAILED_TO_DELETE_TIMER and alerts workspace members with remediation steps.

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