Skip to content
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

use text-embeddings-inference get "413 Payload Too Large" #12263

Open
5 tasks done
momomobinx opened this issue Dec 31, 2024 · 3 comments
Open
5 tasks done

use text-embeddings-inference get "413 Payload Too Large" #12263

momomobinx opened this issue Dec 31, 2024 · 3 comments
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. good first issue Good first issue for newcomers

Comments

@momomobinx
Copy link

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

0.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Use text-embeddings-inference for embedding service, but its single request context size is limited to 2MB. When the document uploaded to the knowledge base is larger than 2MB, this error will be encountered

Notes under text-embeddings-inference

✔️ Expected Behavior

Normally handle large files

❌ Actual Behavior

Error when processing large files

Copy link

dosubot bot commented Dec 31, 2024

I found a similar open issue regarding the "413 Payload Too Large" error when uploading large files in Dify. The suggested solution involves ensuring that both the UPLOAD_FILE_SIZE_LIMIT environment variable and the client_max_body_size parameter in the Nginx configuration are set correctly. Here are the steps to resolve the issue:

  1. Check UPLOAD_FILE_SIZE_LIMIT: Ensure that the UPLOAD_FILE_SIZE_LIMIT in your Dify configuration is set to a value larger than the file you are trying to upload.

  2. Update Nginx Configuration: Modify the client_max_body_size parameter in the Nginx configuration to match the desired upload limit. This can be done by setting the NGINX_CLIENT_MAX_BODY_SIZE environment variable in your Docker setup.

    Example:

    NGINX_CLIENT_MAX_BODY_SIZE=50M

    Update the docker-compose.yaml file:

    environment:
      NGINX_CLIENT_MAX_BODY_SIZE: ${NGINX_CLIENT_MAX_BODY_SIZE:-50M}

    Ensure the Nginx configuration template reflects this change:

    client_max_body_size ${NGINX_CLIENT_MAX_BODY_SIZE};
  3. Rebuild and Restart Docker Containers: After making these changes, rebuild and restart your Docker containers:

    docker-compose down
    docker-compose up --build -d

These steps should help resolve the "413 Payload Too Large" error and allow you to upload files successfully [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. label Dec 31, 2024
@momomobinx
Copy link
Author

That doesn't seem to be the reason.

@momomobinx
Copy link
Author

momomobinx commented Dec 31, 2024

七法全书(V1.1).txt

docker run \
	-d \
	--name embedding \
	--gpus '"device=0"' \
	--env CUDA_VISIBLE_DEVICES=0 \
	-p 7862:80 \
	-v $(pwd):/data \
	ghcr.io/huggingface/text-embeddings-inference:86-1.5 \
	--model-id "/data/gte-small-zh"

@crazywoola crazywoola added the good first issue Good first issue for newcomers label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. good first issue Good first issue for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants