Problem Description
We observe intermittent 504 errors when handling long-running requests through Nginx Ingress, despite the SSE backend functioning properly. Below are the key details:
Environment
1. Backend Service:
- mcp-server deployed in Kubernetes
- Used
server.WithKeepAliveInterval(10 * time.Second) for SSE connections
- Processing logic requires 2+ minutes to complete
2. Gateway Layer:
- Nginx Ingress Controller default timeout settings (60s)
Observed Behavior
client by python-sdk:
- Successful results via /sse endpoint.
- the ToolCall request receive 504 Gateway Timeout after 60s, though backend logs confirm continued processing.
client by mcp-go:
- timeout, no result return
