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.
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.
Failed to delete timer (OS errno %d). EE_FAILED_TO_DELETE_TIMER was added in 8.0.13.
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.
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.
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.
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.
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.
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.
.
The mysqld process lacks write privileges on the data directory because files were created by root or another user.
A Docker bind mount or cloud block storage was mounted read-only, so delete operations fail.
Backup, antivirus, or log shipping tools hold an open handle on the timer file, preventing its removal.
No free space or inodes cause the OS to deny deletion, reporting an error that MySQL surfaces as EE_FAILED_TO_DELETE_TIMER.
.
No. It is an internal cleanup error. Your running queries continue, but event execution may lag.
Not always. Fix permissions or file locks, then toggle the Event Scheduler. Restart only if locks persist.
Timer files reside in the MySQL data directory alongside ibdata files and binary logs.
Yes. Galaxy’s error log integration flags EE_FAILED_TO_DELETE_TIMER and alerts workspace members with remediation steps.