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

Still unable to correctly upload files larger than 15M. After modifying the docker environment variable and changing the UPLOAD_FILE_SIZE_LIMIT value to 30... #4108

Open
4 tasks done
Dillon-Luoke opened this issue May 6, 2024 · 1 comment
Assignees
Labels
🐞 bug Something isn't working

Comments

@Dillon-Luoke
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.6

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After modifying the docker environment variable UPLOAD_FILE_SIZE_LIMIT to 30, the file upload interface in the knowledge base now correctly displays the upload size limit as 30M. However, uploading files larger than 15M still fails, with the progress bar getting stuck.
Steps

✔️ Expected Behavior

Successfully upload files larger than the default 15M to the knowledge base.

❌ Actual Behavior

Unable to correctly upload files larger than 15M. The progress bar gets stuck and throws an error when it reaches around 15M.

@dosubot dosubot bot added the 🐞 bug Something isn't working label May 6, 2024
Copy link

dosubot bot commented May 6, 2024

The problem you're encountering with uploading files larger than 15M, despite setting the UPLOAD_FILE_SIZE_LIMIT to 30, is likely due to the client_max_body_size directive in the Nginx configuration, which is still set to 15M. This setting limits the maximum size of the client request body and needs to be updated to match your desired file size limit.

To fix this issue, locate the nginx.conf file within the Dify repository and change the client_max_body_size directive from 15M to 30M. This file can typically be found in the docker/nginx directory. After updating this setting, make sure to restart the Nginx service to apply the changes.

Additionally, ensure that the application's .env file reflects the same UPLOAD_FILE_SIZE_LIMIT of 30M. This file is usually found in the api directory and might require updating to ensure consistency across your configuration.

Remember, increasing the file size limit can impact server performance and security, so adjust these settings with consideration to your server's capabilities and security measures. If you encounter further issues or receive specific error messages after making these adjustments, providing those details can help diagnose and resolve the problem more effectively.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants