mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[Bug] Timeout for vLLM plugin #332
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sxhysj on GitHub (Jun 1, 2025).
Self Checks
Dify version
1.4.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
OS:
VLLM startup script:
Problem: Timeout for 300 seconds, no matter how I adjust those parameters in .env file.
.env file keep as default. The same version of dify works fine on Linux Ubuntu 24.04. Dify to vLLM calls can reach more than 700 seconds without timeout.
✔️ Expected Behavior
Timeout values could be changed in accordance to .env file settings.
❌ Actual Behavior
Always stayed at 300 seconds on Mac OS.
@dosubot[bot] commented on GitHub (Jun 1, 2025):
Hi @sxhysj! I'm Dosu and I’m helping the dify team.
There are no existing issues or documentation entries directly addressing vLLM plugin timeouts in Dify. However, based on the code and configuration, here are some key points and suggestions:
Timeouts in Dify are controlled by several settings. The GUNICORN_TIMEOUT environment variable (default 200 seconds, recommended 360 seconds) controls the maximum request handling time for the API server, which is important for long-running LLM operations and SSE connections. The TEXT_GENERATION_TIMEOUT_MS setting (default 60000 ms, or 60 seconds) controls the timeout for text generation and workflow processes, but your observed 300-second timeout suggests another layer is involved, possibly at the network or plugin level. See the relevant documentation for these settings here.
The Dify plugin system uses HTTP requests to communicate with the vLLM plugin. The code sets default timeouts for HTTP connections (10s connect, 60s read, 20s write), but if the plugin or network is unresponsive, you may see longer waits or timeouts at the infrastructure level. The error message you shared indicates a read timeout when connecting to the vLLM server at 192.168.1.12:8000, which suggests the vLLM server is either overloaded, slow to respond, or unreachable from the Dify container.
For Docker deployments, ensure you are not using 127.0.0.1 as the plugin host, as this can cause connectivity issues between containers. Always use the host network IP (as you are with 192.168.1.12), but double-check that the vLLM server is accessible from within the Dify container and that no firewall or Docker network misconfiguration is blocking traffic.
If you need to support longer inference times, increase GUNICORN_TIMEOUT and verify that your vLLM server is healthy and responsive. If the vLLM server is slow or hangs, Dify will eventually hit a timeout or connection error, regardless of your .env settings.
If you continue to see timeouts at exactly 300 seconds, check for any reverse proxy (nginx, traefik, etc.) or Docker network settings that may enforce their own timeout limits.
In summary: review and increase GUNICORN_TIMEOUT if needed, ensure network connectivity between Dify and vLLM, avoid 127.0.0.1 for inter-container communication, and check for any external network/proxy timeouts. If the vLLM server itself is slow, you may need to optimize its configuration or hardware.
If you need more specific troubleshooting, please share your .env and Docker network setup.
To reply, just mention my name @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@sxhysj commented on GitHub (Jun 1, 2025):
I tried to use Ollama and succeed but vLLM failed.
@dosubot[bot] commented on GitHub (Aug 19, 2025):
Hi, @sxhysj. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!
@shihuimin1012 commented on GitHub (Sep 11, 2025):
同样的问题,5分钟一超过就time out 请问最后如何解决的,我用的mac dify使用OpenAI-API-compatible