Skip to content

Serving image: /health returns 200 while the vLLM engine is crash-looping, so Vertex AI marks a broken deployment as healthy #46

Closed

Description

@ghchinoy

What happens

structured_server.py answers GET /health with HTTP 200 in all cases (_health_info(): "always HTTP 200 (the container is up)"). Whether the engine can serve is only reported in the body, as vllm_ready. scripts/deploy_vertex_endpoint.sh sets "healthRoute": "/health", so Vertex AI uses this route to decide that the model is deployed.

When the vLLM engine fails at startup and restarts in a loop, the proxy keeps answering /health with 200 and "vllm_ready": false. Vertex reports the deploy as SUCCESSFULLY_DEPLOYED and routes traffic to it. Every decision request then fails:

  • the first requests: 503 Model server early terminated the request (truncated headers) / Connection to backend aborted;
  • afterwards: 503 The service is temporarily unavailable due to no healthy backend servers.

How to reproduce

Deploy the serving image with a configuration the engine can't start with. Two cases we hit:

  1. A100 (compute capability 8.0) with the default FP8 KV cache. vLLM fails at engine start with ValueError: FP8 KV cache is not supported by the Triton attention backend on NVIDIA A100-SXM4-80GB (compute capability 8.0); native FP8 (fp8e4nv) requires SM89+. Re-run with --kv-cache-dtype bfloat16. and restarts in a loop. The deployment still reports healthy. (Workaround: EXTRA_ARGS=--kv-cache-dtype bfloat16.)
  2. L4 with ENFORCE_EAGER=0 at the L4 settings (KV_CACHE_GB=2, MAX_MODEL_LEN=4096). The first request triggers torch.OutOfMemoryError in the engine (22 GiB GPU), the engine exits, and the deployment stays "healthy" while serving only 503s.

In both cases GET /health returned {"status": "ok", ..., "vllm_ready": false} with HTTP 200.

Why it matters

  • A deployment that can't answer a single decision looks healthy to Vertex, to anyone checking only the status code, and to rollout scripts that wait for the deploy operation to finish.
  • Blue/green rollouts can shift traffic onto it.
  • The failure only shows up in the container log, which users have to know to look at.

Suggested fix

Keep the 200 telemetry route for cold-start progress (the gateway, MCP and Studio read it), and give the platform a readiness route that tells the truth:

  • add GET /ready (or /health?ready=1) that returns 503 with the same body until vllm_ready is true, and 503 again if the upstream engine stops answering;
  • point healthRoute in scripts/deploy_vertex_endpoint.sh at it, and replace the TCP startupProbe on port 8080 in deploy/cloudrun/service.yaml (which only checks that the proxy is listening) with an httpGet probe on the same route.

Because Vertex waits for the health route before it reports a deploy as finished, a crash-looping engine then makes the deploy time out or fail visibly instead of succeeding.

Smaller, docs-only change in the meantime: in docs/deploy/evaluate.md and the Vertex/Cloud Run guides, say to wait for "vllm_ready": true in the /health body before sending traffic, not for HTTP 200.

Tests

  • Unit test in deploy/cloudrun/server/: with no upstream listening, /ready returns 503 and /health returns 200 with vllm_ready: false; with a stub upstream returning 200, both return 200.

Activity

  1. added a commit that references this issue on Nov 9, 2026
    731698c
  2. ghchinoy commented on Nov 9, 2026

    @ghchinoy
    CollaboratorAuthor

    Additional Vertex dedicated-endpoint routing note covered in #47:

    • While Vertex AI's internal deployment health check polls GET on healthRoute (GET /ready on container port 8080), external callers hitting a dedicated endpoint's /invoke/* prefix now receive 404 Could not resolve ... to a method on GET requests — only POST is routed externally on /invoke/* (and :rawPredict).
    • Alongside GET /ready and GET /invoke/ready (kept open for platform healthRoute / startupProbe checks), structured_server.py now also answers:
      • POST /ready and POST /invoke/ready (200 when vllm_ready is true, 503 otherwise),
      • POST /health and POST /invoke/health (200 cold-start telemetry), and
      • POST /predict / POST /rawPredict with {"ready": true} (200 when vllm_ready is true, 503 otherwise; {"health": true} stays 200).
        All POST probes enforce X-DGem-Key when DGEM_SERVER_KEY is configured.
  3. added a commit that references this issue on Nov 10, 2026
    4550ee2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions