-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
error when using the "http request" node, with the uploaded file larger than 900KB #12216
Comments
I found a similar open issue where users experienced problems with file uploads in Dify when the file size exceeded certain limits. The suggested solution involves ensuring that both the
These steps should help resolve the "Server disconnected without sending a response" error and allow you to upload files successfully [1][2]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu. But I have changed the
|
@dosu I have changed the
But nothing changed. This suggestion doesn't seem to work. |
If you've already adjusted the
If these steps do not resolve the issue, it might be helpful to isolate the problem by testing with different file sizes and types to see if the issue is consistent across all uploads or specific to certain conditions. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu I check the env in container
It is clear that the and when the file is smaller, it(a new file with size at 526KB) can be successful So in conclusion, nothing happen. This suggestion doesn't seem to work. |
Since you've confirmed that the
By reviewing these areas, you can identify and adjust any additional restrictions that might be causing the issue with larger file uploads. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@dosu Here is more information:
For the 2:
for the 3:
and in
A 5MB or 927KB PDF file will not exceed the limit. So I don't think the problem lies here for the 4: for the 5: I don't know how to check. But I don't think the problem lies here. |
Given the information you've provided, it seems you've thoroughly checked the configuration settings related to file size limits. Since the issue persists, here are a few additional areas to investigate:
If none of these steps reveal the issue, consider isolating the problem by creating a minimal test case that replicates the upload process outside of Dify to see if the problem persists. This can help determine if the issue is with Dify specifically or with the underlying infrastructure. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
@Luminous-seed Did you solve the problem? I encountered the same issue. |
After conducting so many tests, I believe that the design of the HTTPS request node is a problem with this issue(maybe my opinion is wrong, but faor me, I cannot solve this problem ). So I changed my strategy. HTTPS requests themselves can be completed through Python code, so I created a code node to accomplish the task. If you want something about my ecxperience, you can contact me, because some of the code involves privacy. |
Absolutely. How did you pass file variable to python code node? In my version of dify, "Code" node doesn't support passing "File" object as an argument in python function. |
@azhou125 Here is the key process. |
@Luminous-seed As far as I know, this "File->url" variable just pass an empty string "" in version 14.2 (and 15.0). Is that the same case on your side? |
@Luminous-seed Did you solve the problem? I encountered the same issue. |
I have the same problem. |
@azhou125 @liliang1234 |
Self Checks
Dify version
0.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Problem
It seems that when dify's HTTP request uploads a file, with the file larger than about 800KB, it will not be able to send the file successfully.
I have already modified several parameters, such as:
MAX_VARIABLE_SIZE=2048000 not 204800
,WORKFLOW_FILE_UPLOAD_LIMIT=50 not 10
,NGINX_CLIENT_MAX_BODY_SIZE=200M not 15M
However, These modifications are not helpful
preparation
I use the workflow to deal with pdf, whose first step is OCR.
I have completed the OCR backend and all services run normally.
I tested the OCR backend service with some files with size from 100KB to 25MB. Some records are shown below.
SUCCESS with 927KB
SUCCESS with myfilename_test.pdf 5566KB
work in DIFY
BUT In DIFY
the file is small, like 136KB.
the success requests is like this:
the file is larger, like 900KB. ERROR OCCURS.
but when the file is larger than 900KB, the error happened, like Picture ERROR01
Picture ERROR01 (927KB)
but when the file is 5566KB, the error happened, like Picture ERROR02
Picture ERROR02 (5566KB)
The errors log is like :
and:
I debug the backend with the files for Picture ERROR01 and Picture ERROR02. The errors occur at :
error occurs at
file_data = request.get_data()
,withrequest.get_data()
log:The log indicates that the backend did not receive the file at all!!!
✔️ Expected Behavior
the https request should be successful with files larger than 800KB
❌ Actual Behavior
the https request failed with
Server disconnected without sending a response.
Because the server did not receive the correct file at all. I can conclude that this is a problem with dify, because the same https request can be successful when the file is small.The text was updated successfully, but these errors were encountered: