mcp-go
mcp-go copied to clipboard
ToolCall request returns 504 Gateway Timeout via Nginx Ingress for Long-Running Requests
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
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
@CeerDecy How is SSE URL customization implemented? Why can't I modify it and only write the IP address? How to deploy a remote MCP server and access it through FQDNS?
solved
**client by `mcp-go`:**