Nextcloud keeps corrupting database indexes since upgrading to v27 and Cache drives in Unraid

Nextcloud version: 27.x.x
Operating system and version: Unraid (latest)
PHP version: 8.1

So, I’m running an Unraid server with dual Xeon e5-2690 v4 and a Supermicro X10Dri T4+ motherboard. It has 64GB of RAM, and various conventional platter drives, as well as two Crucial 1TB NVME drives on a PCI card in RAID, and a NVIDIA 1060 3GB for Jellyfin.

I am running a newly installed official version of Nextcloud (not the linuxserver distro) and MariaDB (official). I made a mistake in upgrading directly from Nextcloud 25 to 27 (I tried to skip v26 and it didn’t work), so I did a fresh install. Then I moved all the files over to the new share. Everything seemed fine, UNTIL I did the OCC Scan. There are two database tables that keep getting corrupted and it’s driving me nuts. The first one that keeps getting corrupted is the oc_file_locks (not as often), but the one that is the worst is the oc_filecache. I keep getting error messages that the indexes on those tables are corrupt. I have tried to start over with fresh installs multiple times, but it keeps happening and I just don’t understand it.

The only big differences between when I was running v25 without problem are:

  • Linuxserver distro of Nextcloud for v25, official version for v27
  • I added the two NVME drives and put my appdata on them. No other containers are having any issues, though, so I’m not inclined to think it’s that.
  • Mariadb is the official release, not the linuxserver’s distro which I was using with v25

Are there any things anyone could think of that would be causing this constant issue? I can’t really say the issue is persistent while using Nextcloud, because I haven’t been able to use it much as every time I try to scan the files it throws these errors, so I’m not even really able to get going with this version of Nextcloud.

Anyway, sorry for the long-winded post, but I’m hoping someone else might know something that could be the reason why this keeps happening every time I do the “OCC files:scan” command…

EDIT: Here is a screen shot of the one error I am now getting in the Nextcloud UI (as the admin, logged in)