Dify 1.8.0 MCP Tool Execution Block #20417

Closed
opened 2026-02-21 20:07:22 -05:00 by yindo · 1 comment
Owner

Originally created by @echo1999 on GitHub (Nov 19, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.8.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create a new chatflow and enable the MCP service.
  2. Import the MCP service obtained in the first step through Tools - MCP.
  3. Create a new chatflow, select the MCP tool imported in the second step; when this chatflow executes the MCP tool, an occasional execution block of 1 minute occurs.

✔️ Expected Behavior

No 1-minute block during execution

Actual Behavior

Occasional execution block of 1 minute

Originally created by @echo1999 on GitHub (Nov 19, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.8.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Create a new chatflow and enable the MCP service. 2. Import the MCP service obtained in the first step through Tools - MCP. 3. Create a new chatflow, select the MCP tool imported in the second step; when this chatflow executes the MCP tool, an occasional execution block of 1 minute occurs. ### ✔️ Expected Behavior No 1-minute block during execution ### ❌ Actual Behavior Occasional execution block of 1 minute
yindo closed this issue 2026-02-21 20:07:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Nov 19, 2025):

Hi @echo1999! I'm Dosu and I’m helping the dify team.

The 1-minute execution block when running an MCP tool in Dify 1.8.0 (self-hosted, Docker) is most likely caused by the default SSE (Server-Sent Events) read timeout, which is set to 60 seconds in the code. If the MCP tool or server doesn't send any events within this period, the connection waits for the full timeout before proceeding, resulting in the observed delay. This behavior is configurable: the timeout can be adjusted via the MCP provider's configuration or by setting the relevant environment variables in your Docker deployment (such as API_TOOL_DEFAULT_READ_TIMEOUT or SSRF_DEFAULT_READ_TIME_OUT) to a lower value if you want faster failure, or higher if you expect longer waits for tool responses. For persistent or unexplained blocks, also check your reverse proxy and Docker networking setup for buffering or connection issues, and ensure your MCP server is responsive during tool execution.
Reference: SSE timeout in MCP tool code
Reference: Docker Compose timeout settings

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Nov 19, 2025): <!-- Greeting --> Hi @echo1999! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The 1-minute execution block when running an MCP tool in Dify 1.8.0 (self-hosted, Docker) is most likely caused by the default SSE (Server-Sent Events) read timeout, which is set to 60 seconds in the code. If the MCP tool or server doesn't send any events within this period, the connection waits for the full timeout before proceeding, resulting in the observed delay. This behavior is configurable: the timeout can be adjusted via the MCP provider's configuration or by setting the relevant environment variables in your Docker deployment (such as `API_TOOL_DEFAULT_READ_TIMEOUT` or `SSRF_DEFAULT_READ_TIME_OUT`) to a lower value if you want faster failure, or higher if you expect longer waits for tool responses. For persistent or unexplained blocks, also check your reverse proxy and Docker networking setup for buffering or connection issues, and ensure your MCP server is responsive during tool execution. [Reference: SSE timeout in MCP tool code](https://github.com/langgenius/dify/blob/88c9b18cb679cc037be68ac5f168c6bc28809889/api/core/mcp/client/sse_client.py#L41-L308) [Reference: Docker Compose timeout settings](https://github.com/langgenius/dify/blob/88c9b18cb679cc037be68ac5f168c6bc28809889/docker/docker-compose.yaml#L50-L866) <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/40909513-42df-4f21-a3be-695ed95110e4?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/28407)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20417