From 711d209925a92a70a199b6b2bc053c6de63dec0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Tue, 24 Mar 2026 21:27:07 +0000 Subject: [PATCH] fix: App Store 500 Error --- README.md | 23 +++++++++++++++++++++++ deploy/app/helm-values.yaml | 15 ++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e87089d..a3ab1df 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Using [NextCloud](https://nextcloud.com/) - [scan files](#scan-files) - [preview generator](#preview-generator) - [repair tree](#repair-tree) + - [Repair AppData Cache (Fix App Store 500 Error)](#repair-appdata-cache-fix-app-store-500-error) - [delete file locks](#delete-file-locks) - [Setup and Deploy](#setup-and-deploy) - [App](#app) @@ -55,6 +56,28 @@ su -s /bin/bash www-data -c "./occ preview:generate-all --path=marcio.fernandes/ su -s /bin/bash www-data -c "php occ files:repair-tree" ``` +### Repair AppData Cache (Fix App Store 500 Error) + +When the App Store returns HTTP 500, the cause is usually stale filecache entries pointing to missing files inside appdata_*. +This procedure clears the broken cache and forces Nextcloud to rebuild it. + +```bash +# Enable maintenance mode +sudo -u www-data php occ maintenance:mode --on + +# Remove stale filecache entries (run inside MariaDB) +mariadb -u root -p nextcloud -e "DELETE FROM oc_filecache WHERE path LIKE 'appdata_ocuihfjhxkga/appstore%';" + +# Remove corrupted appdata folder +rm -rf /var/www/html/data/appdata_* + +# Disable maintenance mode +sudo -u www-data php occ maintenance:mode --off + +# Rebuild appdata and caches +sudo -u www-data php occ maintenance:repair +``` + ### delete file locks ``` bash diff --git a/deploy/app/helm-values.yaml b/deploy/app/helm-values.yaml index 8663ca8..6ead8ff 100644 --- a/deploy/app/helm-values.yaml +++ b/deploy/app/helm-values.yaml @@ -1,7 +1,7 @@ image: repository: nextcloud flavor: apache - tag: + tag: "latest" pullPolicy: Always replicaCount: 1 @@ -84,7 +84,14 @@ resources: cronjob: enabled: true + # openssl.cafile = /etc/ssl/certs/ca-certificates.crt + #openssl.capath = /etc/ssl/certs + + nextcloud: + phpConfigs: + php.ini: |- + memory_limit = 512M extraVolumes: - name: mf-documents persistentVolumeClaim: @@ -131,6 +138,12 @@ nextcloud: - name: it-storage mountPath: /var/www/html/data/marcio.fernandes/files/NeirdStorage configs: + # appstore.override.config.php: |- + # true, + # 'appstoreurl' => 'https://apps.nextcloud.com/api/v1', + # ); https.config.php: |-