agentscope-ai / agentscope-ai/agentscope-runtime

Intermittent Runtime Service Container Start Timeout (60s) — Filesystem Sandbox on K8s

Abierto
#520 0 comentarios 0 reacciones 0 asignados Ver en GitHub
question
Lenguaje dominante
Python
Estrellas
863
Forks
168
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## Bug Report: Intermittent Runtime Service Container Start Timeout (60s) — Filesystem Sandbox on K8s

### Description

When invoking `call_tool` through the sandbox manager in a **Kubernetes deployment** using the **filesystem sandbox image**, the runtime service intermittently fails to start within the default 60-second timeout, causing a `TimeoutError`. The container is created but the FastAPI service inside it does not become ready in time. This issue is **non-deterministic** — the same workflow may succeed on retry.

### Error Log

```
2026-06-23 00:01:30 - ERROR - [agentscope_runtime.sandbox.manager.server.app] Error in call_tool: Runtime service did not start within the specified timeout. container=agent-runtime-container-43i5rt85iuj4xhqimz3fg31lw, timeout=60s, elapsed=60s, session_ctx_id=None, base_url=http://10.58.8.197:30760/fastapi, stack_trace=NoneType: None

Call stack:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/agentscope_runtime/sandbox/manager/server/app.py", line 176, in endpoint
result = await asyncio.to_thread(method, **data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: Runtime service did not start within the specified timeout. container=agent-runtime-container-43i5rt85iuj4xhqimz3fg31lw, timeout=60s, elapsed=60s, session_ctx_id=None, base_url=http://10.58.8.197:30760/fastapi, stack_trace=NoneType: None
```

### Steps to Reproduce

1. Deploy the sandbox manager in a Kubernetes cluster using the filesystem sandbox image.
2. Trigger a `call_tool` request that requires starting a new runtime container.
3. Wait for the container to start and the FastAPI service to become healthy.
4. The request **intermittently** times out after 60 seconds with the error above. Retrying may succeed without any changes.

### Expected Behavior

The runtime container should start and the FastAPI service should become ready within the 60-second timeout window, allowing `call_tool` to proceed normally.

### Actual Behavior

The container is created, but the FastAPI service at `http://10.58.8.197:30760/fastapi` does not respond within 60 seconds. The timeout is exactly 60s (`elapsed=60s`), suggesting the health check never succeeds.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.