Skip to content

Commit 8eaa078

Browse files
author
Harika
committed
Add model deployment troubleshooting guide for 504 gateway timeout
1 parent 7bcf2bc commit 8eaa078

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Troubleshooting Guide
2+
3+
This section provides common issues observed when running inference against models deployed via Helm commands on Intel® AI for Enterprise Inference — along with step-by-step resolutions.
4+
5+
**Issues:**
6+
1. [Gateway Timeout (504) on Inference Requests](#1-gateway-timeout-504-on-inference-requests)
7+
8+
---
9+
10+
### 1. Gateway Timeout (504) on Inference Requests
11+
12+
**Context:** Model deployed via Helm commands. Inference request sent through the ingress stack (ingress-nginx → APISIX → vLLM service).
13+
14+
**Error:** Inference requests return `504 Gateway Timeout` after 60 seconds:
15+
16+
```
17+
"POST /<model-name>/v1/completions HTTP/2.0" 504
18+
upstream timed out (110: Operation timed out) ... 60.001
19+
```
20+
21+
**Cause:**
22+
23+
CPU-based model inference (`vllm-cpu`) generates tokens at ~0.3–0.4 tokens/s. Responses requiring more than ~24 tokens exceed the default 60s upstream timeout enforced by ingress-nginx and APISIX.
24+
25+
**Fix:**
26+
27+
**Step 1 — Increase the nginx ingress timeout**
28+
29+
Apply to both the `default` and `auth-apisix` namespaces. To find ingress names:
30+
31+
```bash
32+
kubectl get ingress -A | grep <model-name>
33+
```
34+
35+
Then annotate each ingress:
36+
37+
```bash
38+
kubectl annotate ingress <ingress-name> -n <namespace> \
39+
nginx.ingress.kubernetes.io/proxy-read-timeout="300" \
40+
nginx.ingress.kubernetes.io/proxy-send-timeout="300" \
41+
nginx.ingress.kubernetes.io/proxy-connect-timeout="60" \
42+
--overwrite
43+
```
44+
45+
**Step 2 — Increase the APISIX route timeout**
46+
47+
To find the route name:
48+
49+
```bash
50+
kubectl get apisixroute -n auth-apisix | grep <model-name>
51+
```
52+
53+
Edit the route:
54+
55+
```bash
56+
kubectl edit apisixroute <route-name> -n auth-apisix
57+
```
58+
59+
Update the timeout section under the route:
60+
61+
```yaml
62+
spec:
63+
http:
64+
- name: <route-name>
65+
timeout:
66+
connect: 60s
67+
send: 300s
68+
read: 300s
69+
```
70+
71+
**Verification:**
72+
73+
Re-run the inference request and confirm a `200 OK` response is returned within the new timeout window.
74+
75+
**Notes:**
76+
77+
- The nginx ingress annotation takes effect immediately — no pod restart required.
78+
- For GPU-based deployments this timeout is rarely needed as throughput is significantly higher (30–50 tokens/s vs 0.3–0.4 tokens/s on CPU).
79+
- If requests still time out after increasing both timeouts, reduce `max_tokens` in the request payload to limit response length.

0 commit comments

Comments
 (0)