From 37dc428581bc0c09ca0f2c0cb0a46fb8e2fc1a7a Mon Sep 17 00:00:00 2001 From: hsteude Date: Tue, 26 May 2026 10:37:16 +0200 Subject: [PATCH 1/3] fix: add timeout to API health check to prevent UI startup hang The curl health check had no --max-time, causing it to hang indefinitely when OpenCode API accepts the TCP connection but is slow to respond during initialization. This prevented the UI server from ever starting. Also switch from /health (returns SPA HTML) to /session/status (returns JSON, faster) and add -f flag to fail on HTTP errors. --- docker/kubeflow/start-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/kubeflow/start-server.sh b/docker/kubeflow/start-server.sh index 03d75009..be518d1e 100644 --- a/docker/kubeflow/start-server.sh +++ b/docker/kubeflow/start-server.sh @@ -47,7 +47,7 @@ API_PID=$! # Wait for API to be ready echo "Waiting for API server to start..." for i in {1..30}; do - if curl -s http://127.0.0.1:4096/health > /dev/null 2>&1; then + if curl -sf --max-time 2 http://127.0.0.1:4096/session/status > /dev/null 2>&1; then echo "API server is ready!" break fi From 9ba7c41e8d43f7ef4219a617f6c42829928cfec4 Mon Sep 17 00:00:00 2001 From: hsteude Date: Tue, 26 May 2026 11:04:13 +0200 Subject: [PATCH 2/3] fix: clarify API startup timeout message --- docker/kubeflow/start-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/kubeflow/start-server.sh b/docker/kubeflow/start-server.sh index be518d1e..4543573e 100644 --- a/docker/kubeflow/start-server.sh +++ b/docker/kubeflow/start-server.sh @@ -52,7 +52,7 @@ for i in {1..30}; do break fi if [ $i -eq 30 ]; then - echo "ERROR: API server failed to start within 30 seconds" + echo "ERROR: API server failed to start within the allotted time" exit 1 fi sleep 1 From 3a2141f6c5f22baf5df4226d9fac42637a39ebfc Mon Sep 17 00:00:00 2001 From: hsteude Date: Tue, 26 May 2026 11:15:26 +0200 Subject: [PATCH 3/3] fix: clarify API health check retries --- docker/kubeflow/start-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/kubeflow/start-server.sh b/docker/kubeflow/start-server.sh index 4543573e..a21a5427 100644 --- a/docker/kubeflow/start-server.sh +++ b/docker/kubeflow/start-server.sh @@ -52,7 +52,7 @@ for i in {1..30}; do break fi if [ $i -eq 30 ]; then - echo "ERROR: API server failed to start within the allotted time" + echo "ERROR: API server failed to start after 30 attempts with a 2s request timeout" exit 1 fi sleep 1