Skip to content

[Bug] sse_read_timeout=200 do not work #3241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lilongthinker opened this issue May 19, 2025 · 2 comments
Open

[Bug] sse_read_timeout=200 do not work #3241

lilongthinker opened this issue May 19, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@lilongthinker
Copy link

Description

agno 1.5.1

when a tool response time more than 5 seconds , it will return timeout ,even if i set "sse_read_timeout=200" and "timeout=100" in SSEClientParams

Steps to Reproduce

code like below

server_params = SSEClientParams(
    url="https://xxxxx/sse",
    headers={"Authorization":"Bearer YYYYYYYYYYYYYYYYYYYYYYYYY"},
    timeout=100,
    sse_read_timeout=200
)

async def run_agent(message: str):
    # Initialize the MCP server
    async with MCPTools( 
        server_params=server_params,
        transport="sse"
    ) as fs_tools:

and terminal output like


DEBUG =================================================================================================== tool ===================================================================================================
DEBUG Tool call Id: call_d96a223145a64aa2a0b250
DEBUG Error: Timed out while waiting for response to ClientRequest. Waited 5.0 seconds.
DEBUG **********************************************************************************************  TOOL METRICS  **********************************************************************************************
DEBUG * Time:                        5.0211s
DEBUG **********************************************************************************************  TOOL METRICS  **********************************************************************************************

Agent Configuration (if applicable)

like above

Expected Behavior

call the tool as shorter tools invoke

Actual Behavior

show timeout error and retry again and fail again

Screenshots or Logs (if applicable)


DEBUG =================================================================================================== tool ===================================================================================================
DEBUG Tool call Id: call_d96a223145a64aa2a0b250
DEBUG Error: Timed out while waiting for response to ClientRequest. Waited 5.0 seconds.
DEBUG **********************************************************************************************  TOOL METRICS  **********************************************************************************************
DEBUG * Time:                        5.0211s
DEBUG **********************************************************************************************  TOOL METRICS  **********************************************************************************************

Environment

it shows above

Possible Solutions (optional)

maybe the timeout does not work

Additional Context

No response

@lilongthinker lilongthinker added the bug Something isn't working label May 19, 2025
Copy link

linear bot commented May 19, 2025

@lilongthinker
Copy link
Author

finally when i set timeout_seconds in the mcp tool param it works

async def run_agent(message: str):
    # Initialize the MCP server
    async with MCPTools( 
        server_params=server_params,
        transport="sse",
        timeout_seconds=30        #this works
    ) as fs_tools:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant