mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Huggingface Text Embedding Inference always fails for "big" file with the timeout error #205
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 @qiulang on GitHub (Apr 17, 2025).
Self Checks
Dify version
1.1.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I have set up text-embeddings-inference using its latest cpu-1.7 image. The docker runs at the on the same machine that dify dockers run
For small files, embedding works, but if I upload a big file, say, 60k, embedding always fails with timeout error no matter how many times I tried.
The timeout error
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
@dosubot[bot] commented on GitHub (Apr 17, 2025):
A similar issue has been discussed in the Dify repository, where the Huggingface Text Embedding Inference fails with a timeout error when processing large files in a self-hosted Docker setup. The problem might be related to the
TEXT_GENERATION_TIMEOUT_MSsetting, which defaults to 60000 milliseconds (60 seconds). This timeout might not be sufficient for large files, such as 60k. Increasing this timeout value could help resolve the issue. Additionally, adjusting theGUNICORN_TIMEOUTsetting to 360 seconds is recommended to support long-running connections [1].To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@qiulang commented on GitHub (Apr 17, 2025):
I have increased TEXT_GENERATION_TIMEOUT_MS to 10 minutes and I start my huggingface_tei docker using --max-client-batch-size 16 --max-batch-tokens 8192
But I still get the time out error
What else can I do ?
@qiulang commented on GitHub (Apr 18, 2025):
I also increased GUNICORN_TIMEOUT to 600
start huggingface_tei with the default value --max-client-batch-size 32 --max-batch-tokens 16384
Same timeout error.
Upgrade dify to 1.2.0 as well.
@qiulang commented on GitHub (Apr 20, 2025):
I have tried all I can find but huggingface_tei always fails with timeout, so I switch to Xinference to server my embedding model and it works just fine. So either the dify huggingface_tei plugin has problem or huggingface_tei has problem to work with dify
@sungongwei commented on GitHub (May 17, 2025):
huggingface_tei 插件的问题,里面请求用的httpx , post请求的默认超时时间是5s,
@qiulang commented on GitHub (May 20, 2025):
我已经放弃这个改 xinference