From b5dad7927aa706d34793ac312aa0d6399c806bf1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:35:13 +0000 Subject: [PATCH] perf(fulltextsearch): improve elasticsearch healthcheck and add performance tuning settings - Replace TCP-only nc healthcheck with HTTP cluster health API check via curl, so the container is only marked healthy when ES is actually ready (not just when the TCP port is open during startup) - Add indices.fielddata.cache.size=20% to cap field-data cache and prevent unbounded heap growth / OOM kills on large datasets - Add indices.memory.index_buffer_size=20% to improve bulk indexing throughput by buffering more data in memory before flushing to disk - Add thread_pool.write.queue_size=1000 to avoid rejected indexing requests when Nextcloud's background jobs submit many files simultaneously Changes applied to: Containers/fulltextsearch/healthcheck.sh, php/containers.json, manual-install/latest.yml Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/a036678d-a9f5-4db3-8cc6-3e3d52f4e97f Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com> --- Containers/fulltextsearch/healthcheck.sh | 2 +- manual-install/latest.yml | 3 +++ php/containers.json | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Containers/fulltextsearch/healthcheck.sh b/Containers/fulltextsearch/healthcheck.sh index 5e888ea6..bdc4d92b 100644 --- a/Containers/fulltextsearch/healthcheck.sh +++ b/Containers/fulltextsearch/healthcheck.sh @@ -1,3 +1,3 @@ #!/bin/bash -nc -z 127.0.0.1 9200 || exit 1 +curl -fs "http://127.0.0.1:9200/_cluster/health" | grep -qv '"status":"red"' || exit 1 diff --git a/manual-install/latest.yml b/manual-install/latest.yml index c6b81f16..fa189abe 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -441,6 +441,9 @@ services: - http.port=9200 - xpack.license.self_generated.type=basic - xpack.security.enabled=false + - indices.fielddata.cache.size=20% + - indices.memory.index_buffer_size=20% + - thread_pool.write.queue_size=1000 - FULLTEXTSEARCH_PASSWORD volumes: - nextcloud_aio_elasticsearch:/usr/share/elasticsearch/data:rw diff --git a/php/containers.json b/php/containers.json index 96346cfe..511a2bb1 100644 --- a/php/containers.json +++ b/php/containers.json @@ -809,6 +809,9 @@ "http.port=9200", "xpack.license.self_generated.type=basic", "xpack.security.enabled=false", + "indices.fielddata.cache.size=20%", + "indices.memory.index_buffer_size=20%", + "thread_pool.write.queue_size=1000", "FULLTEXTSEARCH_PASSWORD=%FULLTEXTSEARCH_PASSWORD%" ], "volumes": [