Plesk

Unable to login to Plesk: 1015 Can’t lock file (errno: 165 – Table is read only)

Symptoms

Plesk is not accessible with the following error:

ERROR: PleskExceptionDatabase
DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: DELETE FROM `SessionContexts` WHERE (`sessionId` IN (SELECT `sessions`.`sess_id` FROM `sessions` WHERE (`modified` + `lifetime` < 1522082154)))

Cause

InnoDB is in a non-finished recovery process.

MySQL/MariaDB configuration file includes the innodb_force_recovery parameter at level 4 or higher:

This causes InnoDB to be set to the a read-only mode as per the official documentation provided by MySQL.

Resolution

  1. Connect to the server via SSH/RDP.

  2. Complete the InnoDB recovery process:

Exit mobile version