Error uploading file to the knowledge base: Upload failed #7530

Closed
opened 2026-02-21 18:21:03 -05:00 by yindo · 7 comments
Owner

Originally created by @Moiyu1998 on GitHub (Jan 5, 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

0.14.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

The file size limit for the knowledge base upload has been changed to 1024MB via environment variables, but an error still occurs when uploading a 35MB .txt file, stating "Upload failed."

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Moiyu1998 on GitHub (Jan 5, 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 0.14.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/a88a56c8-e12d-4c94-b140-09280513d83e) The file size limit for the knowledge base upload has been changed to 1024MB via environment variables, but an error still occurs when uploading a 35MB .txt file, stating "Upload failed." ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🌚 invalid labels 2026-02-21 18:21:03 -05:00
yindo closed this issue 2026-02-21 18:21:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 5, 2025):

I found a similar open issue where users experienced problems with file uploads in Dify, even after setting the UPLOAD_FILE_SIZE_LIMIT to a large value. The suggested solution involves ensuring that the Celery worker service is running correctly. Here are the steps you can follow:

  1. Check if the worker service is running:
    Use the following Docker command to list the status of all services:

    docker compose ps
    

    Look for the worker service in the output. It should show a status of Up.

  2. Start the worker service if it is not running:
    If the worker service is not running, start it with:

    docker compose up -d worker
    
  3. Check the logs for the worker service:
    If the worker service is running but the upload still fails, check the logs for any errors:

    docker compose logs worker
    

    Look for any errors or warnings that might indicate why the worker is not processing the file upload tasks.

  4. Ensure all necessary services are running:
    Make sure all other necessary services are running correctly. You can start all services with:

    cd dify/docker
    docker compose up -d
    

    Then, verify the status of all containers:

    docker compose ps
    

    Ensure that all services, including api, worker, web, weaviate, db, redis, and nginx, are up and running [1].

These steps should help you diagnose and resolve the file upload issue.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Jan 5, 2025): <!-- Answer --> I found a similar open issue where users experienced problems with file uploads in Dify, even after setting the `UPLOAD_FILE_SIZE_LIMIT` to a large value. The suggested solution involves ensuring that the Celery worker service is running correctly. Here are the steps you can follow: 1. **Check if the worker service is running:** Use the following Docker command to list the status of all services: ```sh docker compose ps ``` Look for the `worker` service in the output. It should show a status of `Up`. 2. **Start the worker service if it is not running:** If the worker service is not running, start it with: ```sh docker compose up -d worker ``` 3. **Check the logs for the worker service:** If the worker service is running but the upload still fails, check the logs for any errors: ```sh docker compose logs worker ``` Look for any errors or warnings that might indicate why the worker is not processing the file upload tasks. 4. **Ensure all necessary services are running:** Make sure all other necessary services are running correctly. You can start all services with: ```sh cd dify/docker docker compose up -d ``` Then, verify the status of all containers: ```sh docker compose ps ``` Ensure that all services, including `api`, `worker`, `web`, `weaviate`, `db`, `redis`, and `nginx`, are up and running <sup>[[1]](https://github.com/langgenius/dify/issues/10834)</sup>. These steps should help you diagnose and resolve the file upload issue. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/1f50d3a2-78bb-4887-81a5-9ff4c3776485?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Jan 5, 2025):

Please provide the container logs, this message is insufficient to guess what is going on.

@crazywoola commented on GitHub (Jan 5, 2025): Please provide the container logs, this message is insufficient to guess what is going on.
Author
Owner

@Moiyu1998 commented on GitHub (Jan 5, 2025):

Please provide the container logs, this message is insufficient to guess what is going on.

I checked the logs of each container, and there was no error information.

@Moiyu1998 commented on GitHub (Jan 5, 2025): > Please provide the container logs, this message is insufficient to guess what is going on. I checked the logs of each container, and there was no error information.
Author
Owner

@crazywoola commented on GitHub (Jan 6, 2025):

Then you can check the api response body and get the exact error details.

@crazywoola commented on GitHub (Jan 6, 2025): Then you can check the api response body and get the exact error details.
Author
Owner

@Moiyu1998 commented on GitHub (Jan 6, 2025):

Then you can check the api response body and get the exact error details.

Sorry, I can't find the API response body. Why does the upload still fail even after I changed the file size?

@Moiyu1998 commented on GitHub (Jan 6, 2025): > Then you can check the api response body and get the exact error details. Sorry, I can't find the API response body. Why does the upload still fail even after I changed the file size?
Author
Owner

@lackoxy commented on GitHub (Jan 6, 2025):

try to increase your nginx max body size

NGINX_CLIENT_MAX_BODY_SIZE=15M
image

@lackoxy commented on GitHub (Jan 6, 2025): try to increase your nginx max body size > NGINX_CLIENT_MAX_BODY_SIZE=15M ![image](https://github.com/user-attachments/assets/dcdc9a58-524e-426f-b354-079e2ab5a4e1)
Author
Owner

@Moiyu1998 commented on GitHub (Jan 6, 2025):

try to increase your nginx max body size

NGINX_CLIENT_MAX_BODY_SIZE=15M
image

Thank you so much! The issue has been resolved.

@Moiyu1998 commented on GitHub (Jan 6, 2025): > try to increase your nginx max body size > > > NGINX_CLIENT_MAX_BODY_SIZE=15M > > ![image](https://private-user-images.githubusercontent.com/57206117/400351082-dcdc9a58-524e-426f-b354-079e2ab5a4e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYxNTE4NzAsIm5iZiI6MTczNjE1MTU3MCwicGF0aCI6Ii81NzIwNjExNy80MDAzNTEwODItZGNkYzlhNTgtNTI0ZS00MjZmLWIzNTQtMDc5ZTJhYjVhNGUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA2VDA4MTkzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1Yjk2OTY4ZTI5MjkxMTc5ZDZjOGU4Y2MyZmNiNjZiMzg2YTZlZTkyMjc1YzBjZGIxNGE4OTYyMDM3OTM4YjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yEYqerLrbiKvXIvu5GQvq0GtlZMEnvweeJXtqps1yX8) Thank you so much! The issue has been resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7530