Mysql-error during installation of calendar-app nextcloud 20.0.8

Maybe someone could help me understanding a MySQL-error-message.

When I try to install the calendar-app from within the nextcloud-admin-interface, I get this error:

An exception occured while executing 'SELECT DISTINCT 
k.`CONSTRAINT_NAME`,
k.`COLUMN_NAME`,
k.`REFERENCED_TABLE_NAME`,
k.`REFERENCED_COLUMN_NAME`/*!50116,
c.update_rule, c.delete_rule */ FROM 
information_schema.key_column_usage k /*!50116 
INNER JOIN 
information_schema.referential_constraints c ON 
c.constraint_name = k.contstraint_name AND 
c.table_name = 'oc_documents_op' */ WHERE
k.table_name = 'oc_documents_op' AND 
k.table_schema = 'nextcloud' /*!50116 AND
c.contstraint_schema = 'nextcloud' */ AND 
k.`REFERENCED_COLUMN_NAME` is not NULL':
SQLSTATE[HY000]: General error: 2006 MySQL server gone away

What does this mean and what should be the next steps to solve this problem?

You have to Google this error. Looks something running unstable. Upgrade your server or restart it.

Hi Morta, thanks for your answer!

I found out that I’m using MariaDB version 5.5.68. When I try to install the calendar app, the mariadb.log shows the following:

InnoDB: Error: tried to read 16384 bytes at offset 0 12713984.
InnoDB: Was only able to read 12288.
0204 23:28:37  InnoDB: Operating system error number 5 in a file operation.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
220204 23:28:37 mysqld_safe Number of processes running now: 0
220204 23:28:38 mysqld_safe mysqld restarted
220204 23:28:38 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 5231 ...
220204 23:28:38 InnoDB: The InnoDB memory heap is disabled
220204 23:28:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
220204 23:28:38 InnoDB: Compressed tables use zlib 1.2.7
220204 23:28:38 InnoDB: Using Linux native AIO
220204 23:28:38 InnoDB: Initializing buffer pool, size = 128.0M
220204 23:28:38 InnoDB: Completed initialization of buffer pool
220204 23:28:38 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
220204 23:28:38  InnoDB: Waiting for the background threads to start
220204 23:28:39 Percona XtraDB (http://www.percona.com) 5.5.61-MariaDB-38.13 started; log sequence number 12189548202
220204 23:28:39 [Note] Plugin 'FEEDBACK' is disabled.
220204 23:28:39 [Note] Server socket created on IP: '0.0.0.0'.
220204 23:28:39 [Note] Event Scheduler: Loaded 0 events
220204 23:28:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.68-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server

Since it’s an input/output error (see line 4 above), I checked the relevant file systems with no problems.

InnoDB: Error: tried to read 16384 bytes at offset 0 12713984.
InnoDB: Was only able to read 12288.

You have to increase the bytes to read. You must Google how to make it. That is a configuration error and limitation

I was able to enalarge innodb_buffer_pool_size to 1GB. This is confirmed:

MariaDB [(none)]> select @@innodb_buffer_pool_size;
+---------------------------+
| @@innodb_buffer_pool_size |
+---------------------------+
|                1073741824 |
+---------------------------+

This IT-Blog and that MySQL-Reference were helpful.

After restarting mysql-server and trying to install calendar-app again the same both error-messages within nextcloud and the mariadb.log appeared again.

Furthermore I could find out that the error in mariadb.log couldt be reproduced with one of these actions:

  1. Using nextcloud database in mysql and then executing: show tables;
   Database changed
   MariaDB [nextcloud]> show tables;
   ERROR 2006 (HY000): MySQL server has gone away
   No connection. Trying to reconnect...
   Connection id:    1
   Current database: nextcloud
   ERROR 2006 (HY000): MySQL server has gone away
   No connection. Trying to reconnect...
   ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql /mysql.sock' (111)
   ERROR: Can't connect to the server
  1. Executing mysqlcheck nextcloud
    mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

Seems, that increasing innodb_buffer_pool_size is not related to my problem. What else could I check? Thanks a lot!