Skip to content

Conversation

@ashwin-ranade
Copy link
Collaborator

@ashwin-ranade ashwin-ranade commented Dec 19, 2025

Summary

This PR adds timeout configuration for MCP servers to prevent hanging requests and fix 30-second timeout errors.

Problem

MCP servers often have long-running operations that exceed the default 30-second Istio timeout, causing request failures.

Solution

  • Detect MCP servers by checking if forwarder_type is 'passthrough' and routes contain '/mcp'
  • Keep default timeouts for non-MCP endpoints

- Add 5-minute Istio VirtualService timeout for MCP servers
- Add 10-minute aiohttp ClientSession timeout for MCP passthrough forwarders
- Fixes 30-second timeout errors causing MCP request failures

MCP servers often have long-running operations that exceed the default
30-second Istio timeout. This change:
1. Detects MCP servers by checking if forwarder_type is 'passthrough'
   and routes contain '/mcp'
2. Sets Istio VirtualService timeout to 5 minutes for MCP servers
3. Sets aiohttp ClientSession timeout to 10 minutes for MCP passthrough forwarders
4. Keeps default timeouts for non-MCP endpoints
@ashwin-ranade ashwin-ranade changed the title fix: Add endpoint_name fallback for orphaned K8s resource cleanup fix: Add timeout configuration for MCP servers Dec 19, 2025
@ashwin-ranade ashwin-ranade marked this pull request as ready for review December 19, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants