1034 Index for table 'oc_filecache' is corrupt; try to repair it

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 27.1.9 but just upgraded to 28.0.5
Operating system and version: Debian 12 on Raspberry Pi 4
Apache or nginx version: Apache 2.4.59-1~deb12u1

I get an error when I try to find the apache version this way:

~$ sudo apache2 --version
[Sat May 11 12:09:08.632506 2024] [core:warn] [pid 79034] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

PHP version: 8.2.18

The issue you are facing:

Database corruption? Resulting in errors while searching in files. All I noticed as a user was that searching for certain things resulted in a HTTP 500 error, similar to this issue #30140. I upgraded to 28.0.5 hoping it would fix it, but it informed me that there were several more issues in the log from before. Namely:

"1034 Index for table 'oc_filecache' is corrupt; try to repair it." 

I am a novice with databases; at this point I don’t know the full extent of the problem or the solution.

I found some more relevant errors in journalctl -u mariadb ; I’m not sure how to look back further to May 5th, but I think it may be relevant based on the warnings in the nextcloud log.

Database errors make me very nervous; I am not sure what to do here or what caused the problem.

MariaDB logs from May 9 to present
...skipping...
May 09 02:00:04 nc mariadbd[901]: 2024-05-09  2:00:04 0 [Note] InnoDB: Removed temporary tablespace data file: "./ibtmp1"                                                                                                             [0/693]
May 09 02:00:04 nc mariadbd[901]: 2024-05-09  2:00:04 0 [Note] InnoDB: Shutdown completed; log sequence number 33985580988; transaction id 79652186
May 09 02:00:04 nc mariadbd[901]: 2024-05-09  2:00:04 0 [Note] /usr/sbin/mariadbd: Shutdown complete
May 09 02:00:04 nc systemd[1]: mariadb.service: Deactivated successfully.
May 09 02:00:04 nc systemd[1]: Stopped mariadb.service - MariaDB 10.11.6 database server.
May 09 02:00:04 nc systemd[1]: mariadb.service: Consumed 59min 407ms CPU time.
-- Boot a9ea54ae537247d9b894b836de820b41 --
May 09 02:00:29 nc systemd[1]: Starting mariadb.service - MariaDB 10.11.6 database server...
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] Starting MariaDB 10.11.6-MariaDB-0+deb12u1 source revision  as process 951
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] InnoDB: Number of transaction pools: 1
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] InnoDB: Using ARMv8 crc32 instructions
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] InnoDB: Using liburing
May 09 02:00:36 nc mariadbd[951]: 2024-05-09  2:00:36 0 [Note] InnoDB: Initializing buffer pool, total size = 1.367GiB, chunk size = 21.875MiB
May 09 02:00:37 nc mariadbd[951]: 2024-05-09  2:00:37 0 [Note] InnoDB: Completed initialization of buffer pool
May 09 02:00:37 nc mariadbd[951]: 2024-05-09  2:00:37 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
May 09 02:00:38 nc mariadbd[951]: 2024-05-09  2:00:38 0 [Note] InnoDB: End of log at LSN=33985580988
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] InnoDB: 128 rollback segments are active.
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] InnoDB: log sequence number 33985580988; transaction id 79652187
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] Plugin 'FEEDBACK' is disabled.
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
May 09 02:00:39 nc mariadbd[951]: 2024-05-09  2:00:39 0 [Note] Server socket created on IP: '127.0.0.1'.
May 09 02:00:47 nc mariadbd[951]: 2024-05-09  2:00:47 0 [Note] /usr/sbin/mariadbd: ready for connections.
May 09 02:00:47 nc mariadbd[951]: Version: '10.11.6-MariaDB-0+deb12u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 12
May 09 02:00:48 nc systemd[1]: Started mariadb.service - MariaDB 10.11.6 database server.
May 09 02:00:55 nc mariadbd[951]: 2024-05-09  2:00:55 0 [Note] InnoDB: Buffer pool(s) load completed at 240509  2:00:55
May 11 10:58:51 nc mariadbd[951]: 2024-05-11 10:58:51 6026 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 10:58:51 nc mariadbd[951]: 2024-05-11 10:58:51 6026 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:00:15 nc mariadbd[951]: 2024-05-11 11:00:15 6132 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:00:15 nc mariadbd[951]: 2024-05-11 11:00:15 6132 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:00:17 nc mariadbd[951]: 2024-05-11 11:00:17 6145 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:00:17 nc mariadbd[951]: 2024-05-11 11:00:17 6145 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:00:20 nc mariadbd[951]: 2024-05-11 11:00:20 6156 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:00:20 nc mariadbd[951]: 2024-05-11 11:00:20 6156 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:02:57 nc mariadbd[951]: 2024-05-11 11:02:57 6228 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:02:57 nc mariadbd[951]: 2024-05-11 11:02:57 6228 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:04:41 nc mariadbd[951]: 2024-05-11 11:04:41 6272 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:04:41 nc mariadbd[951]: 2024-05-11 11:04:41 6272 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:05:30 nc mariadbd[951]: 2024-05-11 11:05:30 6303 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:05:30 nc mariadbd[951]: 2024-05-11 11:05:30 6303 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:05:34 nc mariadbd[951]: 2024-05-11 11:05:34 6313 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:05:34 nc mariadbd[951]: 2024-05-11 11:05:34 6313 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:03 nc mariadbd[951]: 2024-05-11 11:06:03 6333 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:03 nc mariadbd[951]: 2024-05-11 11:06:03 6333 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:06 nc mariadbd[951]: 2024-05-11 11:06:06 6345 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:06 nc mariadbd[951]: 2024-05-11 11:06:06 6345 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:08 nc mariadbd[951]: 2024-05-11 11:06:08 6356 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:08 nc mariadbd[951]: 2024-05-11 11:06:08 6356 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:37 nc mariadbd[951]: 2024-05-11 11:06:37 6377 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:37 nc mariadbd[951]: 2024-05-11 11:06:37 6377 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:40 nc mariadbd[951]: 2024-05-11 11:06:40 6388 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:40 nc mariadbd[951]: 2024-05-11 11:06:40 6388 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:42 nc mariadbd[951]: 2024-05-11 11:06:42 6403 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:42 nc mariadbd[951]: 2024-05-11 11:06:42 6403 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:44 nc mariadbd[951]: 2024-05-11 11:06:44 6415 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:44 nc mariadbd[951]: 2024-05-11 11:06:44 6415 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it
May 11 11:06:45 nc mariadbd[951]: 2024-05-11 11:06:45 6425 [ERROR] InnoDB: We detected index corruption in an InnoDB type table. You have to dump + drop + reimport the table or, in a case of widespread corruption, dump all InnoDB tables>
May 11 11:06:45 nc mariadbd[951]: 2024-05-11 11:06:45 6425 [ERROR] mariadbd: Index for table 'oc_filecache' is corrupt; try to repair it

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

I am not sure what put the system in this state, but I can get the error message to reappear if I search for anything like ph + any other characters, users+ any other characters, uni + any other characters; I didn’t try too many combinations, it seems like a general problem.

The output of your Nextcloud log in Admin > Logging:

dpaste: Nextcloud Log from Admin Panel (recent only), by treesmcgees (redacted IP addresses)

The output of your config.php file in /path/to/nextcloud :

config.php (redacted)
<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
    1 => '192.168.xxx.xxx',
  ),
  'datadirectory' => '/media/nc-2tb/2ncdata',
  'dbtype' => 'mysql',
  'version' => '28.0.5.1',
  'overwrite.cli.url' => 'xxx',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => 'xxx',
  'mail_smptsecure' => 'tls',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpname' => 'xxx@xxx.com',
  'mail_smtppassword' => 'xxx',
  'mail_smtptimeout' => 30,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => xxx,
  ),
  'default_phone_region' => 'US',
  'maintenance' => false,
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'lost_password_link' => 'disabled',
  'mail_smtpsecure' => 'tls',
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'xxx',
);

The output of your Apache/nginx/system log in /var/log/____:

# cat error.log error.log.1 error.log.2 error.log.3 error.log.4 error.log.5 error.log.6 error.log.7
[Sat May 11 00:00:02.995579 2024] [ssl:warn] [pid 977] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Sat May 11 00:00:03.005079 2024] [mpm_prefork:notice] [pid 977] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat May 11 00:00:03.005141 2024] [core:notice] [pid 977] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 10 00:00:02.991474 2024] [ssl:warn] [pid 977] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Fri May 10 00:00:03.000933 2024] [mpm_prefork:notice] [pid 977] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Fri May 10 00:00:03.001008 2024] [core:notice] [pid 977] AH00094: Command line: '/usr/sbin/apache2'
[Sat May 11 00:00:02.627854 2024] [mpm_prefork:notice] [pid 977] AH00171: Graceful restart requested, doing restart
[Thu May 09 00:00:07.963403 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Thu May 09 00:00:07.972269 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Thu May 09 00:00:07.972318 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 09 02:00:00.349797 2024] [mpm_prefork:notice] [pid 35684] AH00170: caught SIGWINCH, shutting down gracefully
[Thu May 09 02:00:36.815033 2024] [ssl:warn] [pid 967] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Thu May 09 02:00:56.086722 2024] [ssl:warn] [pid 977] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Thu May 09 02:00:56.133406 2024] [mpm_prefork:notice] [pid 977] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Thu May 09 02:00:56.133544 2024] [core:notice] [pid 977] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 10 00:00:02.631052 2024] [mpm_prefork:notice] [pid 977] AH00171: Graceful restart requested, doing restart
[Wed May 08 00:00:10.664330 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Wed May 08 00:00:10.673315 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Wed May 08 00:00:10.673361 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 09 00:00:07.549087 2024] [mpm_prefork:notice] [pid 35684] AH00171: Graceful restart requested, doing restart
[Tue May 07 00:00:09.442532 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Tue May 07 00:00:09.450440 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Tue May 07 00:00:09.450484 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Wed May 08 00:00:10.200087 2024] [mpm_prefork:notice] [pid 35684] AH00171: Graceful restart requested, doing restart
[Mon May 06 00:00:07.398037 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Mon May 06 00:00:07.433136 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Mon May 06 00:00:07.433471 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Tue May 07 00:00:09.152206 2024] [mpm_prefork:notice] [pid 35684] AH00171: Graceful restart requested, doing restart
[Sun May 05 00:00:08.626707 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Sun May 05 00:00:08.636089 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sun May 05 00:00:08.636142 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Mon May 06 00:00:07.026143 2024] [mpm_prefork:notice] [pid 35684] AH00171: Graceful restart requested, doing restart
[Sat May 04 00:00:04.597453 2024] [ssl:warn] [pid 35684] AH01882: Init: this version of mod_ssl was compiled against a newer library (OpenSSL 3.0.13 30 Jan 2024 (OpenSSL 3.0.11 19 Sep 2023), version currently loaded is 0x300000B0) - may result in undefined or erroneous behavior
[Sat May 04 00:00:04.606801 2024] [mpm_prefork:notice] [pid 35684] AH00163: Apache/2.4.59 (Debian) OpenSSL/3.0.11 configured -- resuming normal operations
[Sat May 04 00:00:04.606850 2024] [core:notice] [pid 35684] AH00094: Command line: '/usr/sbin/apache2'
[Sun May 05 00:00:08.332522 2024] [mpm_prefork:notice] [pid 35684] AH00171: Graceful restart requested, doing restart

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Log filtered for Error
Error	PHP	
getimagesizefromstring(): Corrupt JPEG data: 2 extraneous bytes before marker at /var/www/nc.redacted.com/apps/photos/lib/Listener/SizeMetadataProvider.php#64
May 11, 2024, 12:13:42 PM 	
Error	PHP	
getimagesizefromstring(): Corrupt JPEG data: 2 extraneous bytes before marker at /var/www/nc.redacted.com/apps/photos/lib/Listener/SizeMetadataProvider.php#64
May 11, 2024, 12:13:42 PM 	
Error	PHP	
getimagesizefromstring(): Corrupt JPEG data: 2 extraneous bytes before marker at /var/www/nc.redacted.com/apps/photos/lib/Listener/SizeMetadataProvider.php#64
May 11, 2024, 11:50:09 AM 	
Error	PHP	
getimagesizefromstring(): Corrupt JPEG data: 2 extraneous bytes before marker at /var/www/nc.redacted.com/apps/photos/lib/Listener/SizeMetadataProvider.php#64
May 11, 2024, 11:50:09 AM

Yes, these are serious errors. They may be easy to fix, by doing a mysql dump[1] and a restore[2], but it really depends on what the underlying original cause was, where, and how widespread the corruption is. They may have been caused by an improper shutdown (e.g. power loss) or even a bug occasionally in the MariaDB.

If you can pinpoint when those errors started showing up, you could also restore from a backup of your database from before that point (though that could result in some loss of data if you are storing more than just files in your Nextcloud - e.g. calendars, contacts).

Ultimately the errors you’re getting from Nextcloud aren’t the result of Nextcloud Server, but the state of your database server.

The above is also weird. It shouldn’t occur on a standard Debian 12 installation (unless Debian contains a bug at the moment). It may have zero relation to your database matters, but it does make me a bit suspicious about your server environment. OpenSSL 3.0.11 is what’s included in Debian 12 currently. Are you installing some packages from outside of the Debian repositories?

[1] Backup — Nextcloud latest Administration Manual latest documentation
[2] Restoring backup — Nextcloud latest Administration Manual latest documentation

1 Like

I don’t know what caused the mod_ssl mismatch. This system was upgraded from Debian 11, could that be the cause?

Unfortunately, the database error was the first symptom of a failing SD card. I was unable to mount the SD card on another system. Luckily I have recent backgrounds of my nextcloud folder and data directory.

To recover from this, and plan for more resilience in the future, I’m planning some changes. I’d like to install a system that can simply restore a backup, and I’d like to be able to test the backup from time to time.

I’m looking at NextcloudPi and the official all-in-one docker image. Both of which seem to add some complexity but with the benefit of being easy to backup/restore, if I’m understanding correctly. Also the NextcloudPi is preconfigured for the raspberry pi, which might help me avoid running into issues.

I also have have a chance to try and use my hardware more effectively in the reinstall. I have an external USB drive for my data directory, but maybe I could put the system root on there too. Should I try to avoid using an SD card for the root partition of the server on the raspberry pi? (I would need to learn how to do that). Or, do I tolerate the fact that the SD card may fail again since the backup system is more robust?