• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Server Error 500 Plesk\Exception\Database

tnr87

New Pleskian
DB query failed: SQLSTATE[HY000]: General error: 1036 Table 'SessionContexts' is read only, query was: DELETE FROM `SessionContexts` WHERE (`sessionId` IN (SELECT `sessions`.`sess_id` FROM `sessions` WHERE (`modified` + `lifetime` < 1629918079)))
TypePlesk\Exception\Database
MessageDB query failed: SQLSTATE[HY000]: General error: 1036 Table 'SessionContexts' is read only, query was: DELETE FROM `SessionContexts` WHERE (`sessionId` IN (SELECT `sessions`.`sess_id` FROM `sessions` WHERE (`modified` + `lifetime` < 1629918079)))
FileMysql.php
Line79
 
[mysqld]
innodb_force_recovery=6
skip-grant-tables
user=mysql

innodb_force_recovery=6 it only works when there is mariadb

--

[mysqld]
#innodb_force_recovery=6
skip-grant-tables
user=mysql

service mysql restart

mysql up but, error

Server Error

500 Plesk\Exception\Database​

DB query failed: SQLSTATE[42000]: Syntax error or access violation: 1286 Unknown storage engine 'InnoDB', query was: DESCRIBE `sessions`
 
For example:

# vi /etc/my.cnf
[mysqld]
innodb_force_recovery = 2

Aug 26 10:00:36 hostname systemd[1]: Starting MariaDB 10.5.12 database server...
Aug 26 10:00:37 hostname mariadbd[24306]: 2021-08-26 10:00:37 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.12-MariaDB) starting as process 24306 ...
Aug 26 10:00:37 hostname mariadbd[24306]: 2021-08-26 10:00:37 0 [Warning] Could not increase number of max_open_files to more than 32768 (request: 304535)
Aug 26 10:00:37 hostname mariadbd[24306]: 2021-08-26 10:00:37 0 [Warning] Changed limits: max_open_files: 32768 max_connections: 500 (was 500) ta...as 19000)
Aug 26 10:00:37 hostname mariadbd[24306]: 2021-08-26 10:00:37 0 [Note] InnoDB: !!! innodb_force_recovery is set to 2 !!!
Hint: Some lines were ellipsized, use -l to show in full.
 
i increased the limit max_connections error "Changed limits: max_open_files: 32768 max_connections: 500"

Aug 26 10:02:16 hostname mariadbd[26700]: 2021-08-26 10:02:16 0 [ERROR] Plugin 'InnoDB' init function returned error.
Aug 26 10:02:16 hostname mariadbd[26700]: 2021-08-26 10:02:16 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Aug 26 10:02:16 hostname mariadbd[26700]: 2021-08-26 10:02:16 0 [Note] Plugin 'FEEDBACK' is disabled.
Aug 26 10:02:16 hostname mariadbd[26700]: 2021-08-26 10:02:16 0 [Warning] 'thread-concurrency' was removed. It does nothing now and exists only for...nf files.
Aug 26 10:02:16 hostname mariadbd[26700]: 2021-08-26 10:02:16 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Aug 26 10:02:16 hostnamer mariadbd[26700]: 2021-08-26 10:02:16 0 [ERROR] Aborting
Aug 26 10:02:17 hostname systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
Aug 26 10:02:17 hostnamer systemd[1]: Failed to start MariaDB 10.5.12 database server.
Aug 26 10:02:17 hostname systemd[1]: Unit mariadb.service entered failed state.
Aug 26 10:02:17 hostname systemd[1]: mariadb.service failed.
 
Was the database server started with the --skip-innodb parameter? Is it mentioned in /etc/my.cnf somewhere?
 
/etc/my.cnf

content in this section

only works when innodb_force_recovery=6

[mysqld]
innodb_buffer_pool_size = 10M
skip-grant-tables
innodb_force_recovery=6
bind-address = ::ffff:127.0.0.1
local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in Understanding and administering systemd :: Fedora Docs

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid


#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
 
innodb_force_recovery is definitely a critical value for normal operations. According to the manual it means:
"Does not do the redo log roll-forward in connection with recovery. This value can permanently corrupt data files. Leaves database pages in an obsolete state, which in turn may introduce more corruption into B-trees and other database structures. Sets InnoDB to read-only. "

The normal value for innodb_force_recovery is 0. Why have you set it to 6?
 
Back
Top