Error
Error Code:
4085
MySQL Error 4085: Binary Log Purge Locked
Description
This error indicates that an attempt to purge binary logs was blocked because another database session currently holds an `LOCK INSTANCE FOR BACKUP`. MySQL prevents binary log purges during an active backup lock to ensure data integrity and a consistent recovery point for the backup operation. The purge will fail until the backup lock is released.
Error Message
Could not purge binary logs since another session is executing LOCK INSTANCE FOR BACKUP. Wait for that session to release the lock.
Known Causes
3 known causesActive Backup Operation
Another database session is currently executing `LOCK INSTANCE FOR BACKUP`, typically as part of a physical backup process (e.g., with Percona XtraBackup or MySQL Enterprise Backup).
Concurrent Administration Tasks
An automated script or a manual administrative task is running concurrently, which acquired a `LOCK INSTANCE FOR BACKUP` to ensure data consistency for its operation.
Unreleased Backup Lock
A previous backup operation might have failed or been interrupted, leaving the `LOCK INSTANCE FOR BACKUP` unreleased, preventing subsequent binary log purges.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service