From 38306ac540db37c74e695be56407fcb38d7d214e Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Thu, 12 Mar 2026 23:27:12 +0000 Subject: [PATCH] migrate Nextcloud from SQLite to MySQL InnoDB Cluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SQLite was causing constant crash-looping (138 restarts/day) due to write lock contention with concurrent sync clients. Migration required workarounds for multiple occ db:convert-type bugs: - GR error 3100: SET GLOBAL sql_generate_invisible_primary_key = ON - utf8mb3 column creation: stripped 4-byte emoji + invalid UTF-8 from SQLite (F1 calendar events, filecache) - SQLite index corruption: repaired via .dump + INSERT OR IGNORE reimport - kubectl exec timeouts: used nohup + detached process Verified: all 136 tables migrated, 100% row count match across 15 key tables (users, files, calendars, contacts, shares, activity). Also fixed typo: databse → database in chart values. --- stacks/nextcloud/chart_values.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stacks/nextcloud/chart_values.yaml b/stacks/nextcloud/chart_values.yaml index c303cdf8..f8e4dfb5 100644 --- a/stacks/nextcloud/chart_values.yaml +++ b/stacks/nextcloud/chart_values.yaml @@ -40,21 +40,20 @@ nextcloud: mountPath: /etc/apache2/mods-available/mpm_prefork.conf subPath: mpm_prefork.conf -# internalDatabase: -# enabled: false +internalDatabase: + enabled: false externalRedis: enabled: true host: ${redis_host} -# Currently not in use; we use the nextcloud.db sqlite3 externalDatabase: - enabled: false + enabled: true type: mysql host: ${mysql_host} user: nextcloud password: ${db_password} - databse: nextcloud + database: nextcloud persistence: enabled: true