Skip to content

ToolCall request returns 504 Gateway Timeout via Nginx Ingress for Long-Running Requests #162

@CeerDecy

Description

@CeerDecy

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.
Image

client by mcp-go:

  • timeout, no result return

Image

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