dify icon indicating copy to clipboard operation
dify copied to clipboard

podcast audio generator error:Run failed: File is too large which reached the limit of 30MB

Open shilik opened this issue 9 months ago • 7 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Used the NotebookLM by Dify.AI, and got unknown error of "Run failed: File is too large which reached the limit of 30MB", what can be done to get the app run without problems?

✔️ Expected Behavior

working properly

❌ Actual Behavior

not working

shilik avatar May 12 '25 05:05 shilik

To resolve the "Run failed: File is too large which reached the limit of 30MB" error in a self-hosted Docker environment, you can follow these steps:

  1. Set UPLOAD_FILE_SIZE_LIMIT in your .env file to a value larger than your file size, such as UPLOAD_FILE_SIZE_LIMIT=50 for a 35MB file.
  2. Set NGINX_CLIENT_MAX_BODY_SIZE in your Docker environment to a value larger than your file size, such as NGINX_CLIENT_MAX_BODY_SIZE=50M.

After making these changes, rebuild and restart your Docker containers using the following commands:

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

This should help you increase the file upload size limit and resolve the error [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

dosubot[bot] avatar May 12 '25 05:05 dosubot[bot]

I think this is a fixed value for now.

https://github.com/langgenius/dify/blob/abafa686470f32e16e343ee2a3719783707b5011/api/core/plugin/impl/tool.py#L150-L155

crazywoola avatar May 12 '25 06:05 crazywoola

When did the bug fixed? Now?

I have tried several times but still got the error.

2025年5月12日(月) 午後2:06 crazywoola @.***>:

crazywoola left a comment (langgenius/dify#19519) https://github.com/langgenius/dify/issues/19519#issuecomment-2870953899

I think this is a fixed value for now.

https://github.com/langgenius/dify/blob/abafa686470f32e16e343ee2a3719783707b5011/api/core/plugin/impl/tool.py#L150-L155

— Reply to this email directly, view it on GitHub https://github.com/langgenius/dify/issues/19519#issuecomment-2870953899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKW7RHRJEXGVSH24GVJID326A27LAVCNFSM6AAAAAB445N5L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNZQHE2TGOBZHE . You are receiving this because you authored the thread.Message ID: @.***>

shilik avatar May 12 '25 06:05 shilik

To resolve the "Run failed: File is too large which reached the limit of 30MB" error in a self-hosted Docker environment, you can follow these steps:

  1. Set UPLOAD_FILE_SIZE_LIMIT in your .env file to a value larger than your file size, such as UPLOAD_FILE_SIZE_LIMIT=50 for a 35MB file.
  2. Set NGINX_CLIENT_MAX_BODY_SIZE in your Docker environment to a value larger than your file size, such as NGINX_CLIENT_MAX_BODY_SIZE=50M.

After making these changes, rebuild and restart your Docker containers using the following commands:

docker-compose down docker-compose up --build -d This should help you increase the file upload size limit and resolve the error [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

Set NGINX_CLIENT_MAX_BODY_SIZE in your Docker environment to a value larger than your file size, such as NGINX_CLIENT_MAX_BODY_SIZE=50M.

Please tell me which file I should modify? docker-compose.yaml? I followed the instruction above, but still got the same error.

shilik avatar May 12 '25 10:05 shilik

The error "Run failed: File is too large which reached the limit of 30MB" occurs when returning files through a plugin, not when uploading files to the knowledge base. Please read the question carefully— the previous answers you provided are incorrect.

lfenghx avatar May 18 '25 09:05 lfenghx

You can replace the tool.py file based on the original image to build a new image,eg: FROM langgenius/dify-api:1.4.0 COPY ./tool.py /app/api/core/plugin/impl/tool.py

To modify the configuration related to the 30MB

hawkeyou avatar Jun 04 '25 06:06 hawkeyou

I have the same issue. When converting a video (105MB) to audio via FFmpeg, it prompts "Run failed: File is too large which reached the limit of 30MB". I entered the docker-api-1 container and modified tool.py, then ran the process again, but still got the prompt "Run failed: File is too large which reached the limit of 30MB".

Modification method: docker exec -it docker-api-1 /bin/bash cd /app/api/core/plugin/impl/ sed -i 's/30 * 1024 * 1024/300 * 1024 * 1024/g' tool.py

cat tool.py …… if files[chunk_id].bytes_written + len(blob_data) > 300 * 1024 * 1024: ……

yu921 avatar Jun 06 '25 10:06 yu921

It is worked!! I entered the docker-api-1 container and modified tool.py, then exit container and use "docker restart docker-api-1".

tony01100525 avatar Jun 23 '25 03:06 tony01100525

Dify version 1.6.0

Cloud or Self Hosted Self Hosted (Docker)

Run failed: File is too large which reached the limit of 30MB

MDDTGitHub avatar Jul 24 '25 02:07 MDDTGitHub

@crazywoola This issue has not been fixed yet. Dify 1.8.0 meet the same error, use the dify-pdf-process-plugin to process PDF More than 30MB then File is too large which reached the limit of 30MB

Jimmy-L99 avatar Sep 12 '25 02:09 Jimmy-L99

Image需要进入容器中进行修改:/app/api/core/plugin/utils/chunk_merger.py 已经验证可以修改超过30m

unicorn101213 avatar Nov 17 '25 08:11 unicorn101213