Applicable to:
- Plesk Onyx for Windows
- Plesk for Linux
Symptoms
-
Unable to open Plesk with the following error:
CONFIG_TEXT: ERROR: Plesk\Exception\Database: 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)))
-
The same error is shown using
plesk login
command:# plesk login
ERR [panel] Cannot save cli call statistic DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: INSERT CliCallsStat (`util`, `command`, `lastExecutionDateTime`) VALUES (:util, :command, now()) ON DUPLICATE KEY UPDATE `count` = `count` + 1, `lastExecutionDateTime` = now()
DB query failed: SQLSTATE[HY000]: General error: 1015 Can't lock file (errno: 165 - Table is read only), query was: INSERT INTO password_secrets (secret, type, id, created) VALUES ("", "1", "", now());
exit status 1 -
MySQL configuration includes parameter
innodb_force_recovery
at level 1 or higher.# grep -r innodb_force_recovery /etc/my*
/etc/mysql/my.cnf:innodb_force_recovery = 6C:\> findstr innodb_force_recovery "%plesk_dir%MySQL\my.ini"
innodb_force_recovery = 1
Cause
InnoDB databases were in a non-finished recovery process, what causes InnoDB to be set in read-only mode according to MySQL Official Documentation.
Resolution
Complete InnoDB Databases recovery using the article How to fix InnoDB corruption cases for the MySQL databases on Plesk for Linux? or How to fix InnoDB corruption cases for the MySQL databases on Plesk for Windows?
Comments
0 comments
Please sign in to leave a comment.