[Bug]: upload error
Self Checks
- [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] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
- [x] Please do not modify this template :) and fill in all the required fields.
RAGFlow workspace code commit ID
ead5f7aba9125d29ee2881113e0b45dbce93fdf2
RAGFlow image version
v0.17.2
Other environment information
ubuntu 22.04
Actual behavior
- This issue occurs on the file management page.I modified the Nginx configuration and the environment variables in the .env file to set a 10G limit, but uploading the folder still results in an error. After making the changes, I restarted the container and confirmed from within the container that the settings were in effect. In the previous v0.16.0 version, there were no issues; I don't know what's going on. Previously, the folder I uploaded contained over 900 files, with a total size of more than 2GB.
2025-04-02 16:48:52,731 ERROR 29 413 Request Entity Too Large: The data value transmitted exceeds the capacity limit. Traceback (most recent call last): File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() File "/ragflow/.venv/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] File "/ragflow/.venv/lib/python3.10/site-packages/flask_login/utils.py", line 290, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) File "/ragflow/api/apps/file_app.py", line 41, in upload pf_id = request.form.get("parent_id") File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/utils.py", line 107, in __get__ value = self.fget(obj) # type: ignore File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 442, in form self._load_form_data() File "/ragflow/.venv/lib/python3.10/site-packages/flask/wrappers.py", line 115, in _load_form_data super()._load_form_data() File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/wrappers/request.py", line 268, in _load_form_data data = parser.parse( File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/formparser.py", line 242, in parse return parse_func(stream, mimetype, content_length, options) File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/formparser.py", line 267, in _parse_multipart form, files = parser.parse(stream, boundary, content_length) File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/formparser.py", line 413, in parse event = parser.next_event() File "/ragflow/.venv/lib/python3.10/site-packages/werkzeug/sansio/multipart.py", line 205, in next_event raise RequestEntityTooLarge() werkzeug.exceptions.RequestEntityTooLarge: 413 Request Entity Too Large: The data value transmitted exceeds the capacity limit.
2. There is no response when uploading a folder on the knowledge base page.
Expected behavior
No response
Steps to reproduce
Under the parent folder, there are different files and subfolders – a total of 303 folders and 927 files in various formats. However, uploading the folder afterwards results in an error.
Additional information
No response
Hey, @decaMinCow! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project.
The error you're encountering, "413 Request Entity Too Large," indicates that the data being uploaded exceeds the configured limits. Here are a few steps to troubleshoot and resolve this issue:
-
Nginx Configuration: Ensure that the
client_max_body_sizedirective in your Nginx configuration (nginx/nginx.conf) is set to accommodate the 10GB limit you desire. This directive should match or exceed theMAX_CONTENT_LENGTHsetting in your.envfile. -
Environment Variables: Double-check that the
MAX_CONTENT_LENGTHin yourdocker/.envfile is set to a value that supports 10GB. The value should be in bytes, so for 10GB, it should be10737418240. -
Restart Services: After making changes to the Nginx configuration and
.envfile, ensure that you restart both the Nginx service and the RAGFlow application to apply the new settings. -
Check for Version Changes: Since you mentioned that this issue did not occur in version v0.16.0, there might have been changes in version v0.17.2 that affect file uploads. Unfortunately, I couldn't find specific changes between these versions that impact file uploads, so reviewing the release notes or changelog for v0.17.2 might provide additional insights.
-
Multipart Form Data Parsing: There might be limitations or issues with how multipart form data is parsed in the current implementation. Although I couldn't find specific documentation on this, reviewing the relevant code or logs might help identify any parsing issues.
If these steps do not resolve the issue, consider checking the logs for any additional error messages or details that might provide further clues.
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
Failed to load resource: net::ERR_CONNECTION_TIMED_OUTUnderstand this errorAI hooks.ts:199 No files to upload dataset:1 Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden. Element with focus: div Ancestor with aria-hidden: <div tabindex="0" aria-hidden="true" style="width: 0px; height: 0px; overflow: hidden; outline: none;"></div>Understand this errorAI hooks.ts:199 No files to upload dataset:1 Blocked aria-hidden on an element because its descendant retained focus. The focus must not be hidden from assistive technology users. Avoid using aria-hidden on a focused element or its ancestor. Consider using the inert attribute instead, which will also prevent focus. For more details, see the aria-hidden section of the WAI-ARIA specification at https://w3c.github.io/aria/#aria-hidden. Element with focus: div Ancestor with aria-hidden: <div tabindex="0" aria-hidden="true" style="width: 0px; height: 0px; overflow: hidden; outline: none;"></div>Understand this errorAI hooks.ts:199 No files to upload
This error is probably a frontend issue; I see that it didn’t even reach the backend API.
Same issue: folder upload failed, even after modifying the .env and Nginx file upload configuration.