fix: limit yq Go thread usage on hosts with low ulimit -u

IONOS shared hosting enforces a strict process limit. yq (a Go binary)
tries to spawn several OS threads at startup and crashes with
"failed to create new OS thread (errno=11 EAGAIN)" when the limit is
hit, returning empty stdout. This silently skips all references.

Wrap yq with GOMAXPROCS=1 GOGC=off so the Go runtime uses a single
goroutine-running thread and skips GC goroutines, staying within the
host's ulimit -u.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 22:52:35 +02:00
parent 3153b6a24d
commit 6d692cef57
+5
View File
@@ -163,6 +163,11 @@ load_env_vars() {
fi fi
} }
# Wrapper to limit Go thread usage on hosts with low ulimit -u (e.g. IONOS shared hosting)
yq() {
GOMAXPROCS=1 GOGC=off command yq "$@"
}
# Check if yq is installed # Check if yq is installed
check_yq() { check_yq() {
if ! command -v yq &>/dev/null; then if ! command -v yq &>/dev/null; then