Agent fails to wait for a Workflow tool for more than 250 seconds #15261

Closed
opened 2026-02-21 19:20:56 -05:00 by yindo · 3 comments
Owner

Originally created by @hxt365 on GitHub (Jul 11, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.4., 1.5.

Cloud or Self Hosted

Cloud, Self Hosted (Source), Self Hosted (Docker)

Steps to reproduce

  1. Create a workflow and export it as a tool. The workflow contains JustWait node (or whatsoever node) that sleeps for 300 seconds.
  2. Create an Agent node and register the exported workflow as a tool.
  3. Run the Agent node. After 250 seconds, the Agent will get this error: tool invoke error: invocation exited without response

✔️ Expected Behavior

Agent node can run without any issues.

Actual Behavior

tool invoke error: invocation exited without response

Originally created by @hxt365 on GitHub (Jul 11, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.4.*, 1.5.* ### Cloud or Self Hosted Cloud, Self Hosted (Source), Self Hosted (Docker) ### Steps to reproduce 1. Create a workflow and export it as a tool. The workflow contains JustWait node (or whatsoever node) that sleeps for 300 seconds. 2. Create an Agent node and register the exported workflow as a tool. 3. Run the Agent node. After 250 seconds, the Agent will get this error: `tool invoke error: invocation exited without response` ### ✔️ Expected Behavior Agent node can run without any issues. ### ❌ Actual Behavior `tool invoke error: invocation exited without response`
yindo added the 🤖 feat:agent🌊 feat:workflow labels 2026-02-21 19:20:56 -05:00
yindo closed this issue 2026-02-21 19:20:56 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 11, 2025):

The 250-second timeout isn't enforced by Dify itself—it's almost certainly coming from your infrastructure, like Gunicorn, NGINX, or a cloud platform. Dify's workflow execution timeout is set by the WORKFLOW_MAX_EXECUTION_TIME environment variable (default: 1200 seconds), so that's not the limiting factor here. Instead, check your Gunicorn worker timeout (GUNICORN_TIMEOUT in your .env file, default is 200 seconds, recommended is 360 seconds) and any reverse proxy or load balancer settings (like proxy_read_timeout in NGINX) that might be capping request duration.

To allow longer-running workflow tools, increase both WORKFLOW_MAX_EXECUTION_TIME and your web/proxy/server timeouts as needed. If you're running in Docker, update these environment variables and restart your containers. For source deployments, update your environment and restart the relevant processes. For cloud, check your provider's request/connection timeout settings.

No official Dify docs cover best practices for this, but be aware that raising timeouts can increase resource usage and may have side effects if many long-lived requests run in parallel. Monitor your system for resource exhaustion and test thoroughly after making changes.

References:

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Jul 11, 2025): <!-- Answer --> The 250-second timeout isn't enforced by Dify itself—it's almost certainly coming from your infrastructure, like Gunicorn, NGINX, or a cloud platform. Dify's workflow execution timeout is set by the `WORKFLOW_MAX_EXECUTION_TIME` environment variable (default: 1200 seconds), so that's not the limiting factor here. Instead, check your Gunicorn worker timeout (`GUNICORN_TIMEOUT` in your `.env` file, default is 200 seconds, recommended is 360 seconds) and any reverse proxy or load balancer settings (like `proxy_read_timeout` in NGINX) that might be capping request duration. To allow longer-running workflow tools, increase both `WORKFLOW_MAX_EXECUTION_TIME` and your web/proxy/server timeouts as needed. If you're running in Docker, update these environment variables and restart your containers. For source deployments, update your environment and restart the relevant processes. For cloud, check your provider's request/connection timeout settings. No official Dify docs cover best practices for this, but be aware that raising timeouts can increase resource usage and may have side effects if many long-lived requests run in parallel. Monitor your system for resource exhaustion and test thoroughly after making changes. References: - [WORKFLOW_MAX_EXECUTION_TIME and Gunicorn timeout settings](https://github.com/langgenius/dify/blob/d5624ba671201137c32b80ad6e2131feb85fed19/docker/.env.example) - [Workflow execution timeout logic](https://github.com/langgenius/dify/blob/d5624ba671201137c32b80ad6e2131feb85fed19/api/core/workflow/graph_engine/graph_engine.py) - [Config defaults](https://github.com/langgenius/dify/blob/d5624ba671201137c32b80ad6e2131feb85fed19/api/configs/feature/__init__.py) <!-- 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/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/aa52c7ab-9ce0-4360-956a-5bed066fcff3?feedback_type=other)</sup>&nbsp;&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/22196)
Author
Owner

@hxt365 commented on GitHub (Jul 11, 2025):

@crazywoola This issue is not resolved yet. I already set WORKFLOW_MAX_EXECUTION_TIME to 604800 (7 days), and the timeout for gunicorn/nginx/etc. is set properly. FYI Dify does not return the error to users, but the Agent node gets that error from executing the workflow tool.

The error is returned from the Dify's Python plugin SDK https://github.com/langgenius/dify-plugin-sdks/blob/21e77bd043bc5e1c893dc80de779e1b46ae81a7a/python/dify_plugin/core/runtime.py#L211

@hxt365 commented on GitHub (Jul 11, 2025): @crazywoola This issue is not resolved yet. I already set WORKFLOW_MAX_EXECUTION_TIME to 604800 (7 days), and the timeout for gunicorn/nginx/etc. is set properly. FYI Dify does not return the error to users, but the Agent node gets that error from executing the workflow tool. The error is returned from the Dify's Python plugin SDK https://github.com/langgenius/dify-plugin-sdks/blob/21e77bd043bc5e1c893dc80de779e1b46ae81a7a/python/dify_plugin/core/runtime.py#L211
Author
Owner

@cwk0099 commented on GitHub (Sep 11, 2025):

@hxt365 hi, did you find the root cause and fix it?

@cwk0099 commented on GitHub (Sep 11, 2025): @hxt365 hi, did you find the root cause and fix it?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15261