From 3e03fbec63c46d1f6672689d4c71779f2df2228d Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Fri, 13 Mar 2026 18:59:21 +0000 Subject: [PATCH] increase MaxRequestWorkers to 150 now that Nextcloud is on MySQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With SQLite, 50 workers caused all workers to block on DB locks. On MySQL, CPU is ~20m and memory ~143Mi — no resource pressure. The crash-looping was caused by hitting MaxRequestWorkers=50 limit ("server reached MaxRequestWorkers setting"), not by DB contention. --- stacks/nextcloud/main.tf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/stacks/nextcloud/main.tf b/stacks/nextcloud/main.tf index b161b5d7..7da20811 100644 --- a/stacks/nextcloud/main.tf +++ b/stacks/nextcloud/main.tf @@ -93,15 +93,14 @@ resource "kubernetes_config_map" "apache_tuning" { } data = { "mpm_prefork.conf" = <<-EOF - # Conservative SQLite-safe configuration (post-database restoration) - # Balance between avoiding health check timeouts and preventing SQLite lock contention - # 15 workers = safe concurrency for SQLite while handling multiple users + health checks + # Tuned for Nextcloud on MySQL (no SQLite lock contention) + # CPU/RAM usage is low (~20m/143Mi), so more workers are safe - StartServers 4 - MinSpareServers 2 - MaxSpareServers 6 - MaxRequestWorkers 15 - MaxConnectionsPerChild 150 + StartServers 5 + MinSpareServers 5 + MaxSpareServers 15 + MaxRequestWorkers 150 + MaxConnectionsPerChild 500 EOF }