dify http node return "Server disconnected without sending a response" #14065

Closed
opened 2026-02-21 19:15:22 -05:00 by yindo · 4 comments
Owner

Originally created by @ywf on GitHub (May 21, 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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When I use HTTP to call an external API in Dify, it fails to call correctly when the uploaded file size is large (testing found that files exceeding 1M cannot be processed properly).

Image
Based on the previous issue, I tried modifying the parameters in the .env file with the following settings:
# Upload file size limit, default 15M. UPLOAD_FILE_SIZE_LIMIT=100 NGINX_CLIENT_MAX_BODY_SIZE=100M
However, the API still isn't being called correctly.

✔️ Expected Behavior

It should properly read the file and call the API。

Actual Behavior

Image

Originally created by @ywf on GitHub (May 21, 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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When I use HTTP to call an external API in Dify, it fails to call correctly when the uploaded file size is large (testing found that files exceeding 1M cannot be processed properly). ![Image](https://github.com/user-attachments/assets/43edce30-7f96-4fcc-87e6-d18913e7cbbd) Based on the previous issue, I tried modifying the parameters in the .env file with the following settings: `# Upload file size limit, default 15M. UPLOAD_FILE_SIZE_LIMIT=100 NGINX_CLIENT_MAX_BODY_SIZE=100M ` However, the API still isn't being called correctly. ### ✔️ Expected Behavior It should properly read the file and call the API。 ### ❌ Actual Behavior ![Image](https://github.com/user-attachments/assets/eb6753b4-f39d-46ef-9004-457b99188d62)
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 19:15:22 -05:00
yindo closed this issue 2026-02-21 19:15:22 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 21, 2025):

There are similar threads regarding the "Server disconnected without sending a response" error when using Dify's HTTP node for large file uploads. Here are some solutions that have been found:

  1. Squid Proxy Configuration: Modify the docker/ssrf_proxy/squid.conf.template file by adding the parameter client_request_buffer_max_size 10240 KB. This change helps handle larger file sizes [1].

  2. Nginx Configuration: Ensure that the NGINX_CLIENT_MAX_BODY_SIZE environment variable is set to a value larger than your file size. You have already set it to 100M, which should be sufficient. Additionally, verify that the Nginx configuration template reflects this change by including client_max_body_size 100M; in the configuration [2].

  3. Restart Docker Containers: After making these changes, restart your Docker containers to apply the new configurations. Use the following commands:

    docker compose down
    docker compose up -d
    

These steps should help resolve the issue and allow you to upload files larger than 1MB successfully. If the problem persists, consider using a code node to handle the file upload process, as some users have found this approach to be effective [3].

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] commented on GitHub (May 21, 2025): <!-- Answer --> There are similar threads regarding the "Server disconnected without sending a response" error when using Dify's HTTP node for large file uploads. Here are some solutions that have been found: 1. **Squid Proxy Configuration**: Modify the `docker/ssrf_proxy/squid.conf.template` file by adding the parameter `client_request_buffer_max_size 10240 KB`. This change helps handle larger file sizes <sup>[[1]](https://github.com/langgenius/dify/issues/15008)</sup>. 2. **Nginx Configuration**: Ensure that the `NGINX_CLIENT_MAX_BODY_SIZE` environment variable is set to a value larger than your file size. You have already set it to 100M, which should be sufficient. Additionally, verify that the Nginx configuration template reflects this change by including `client_max_body_size 100M;` in the configuration <sup>[[2]](https://github.com/langgenius/dify/issues/16813)</sup>. 3. **Restart Docker Containers**: After making these changes, restart your Docker containers to apply the new configurations. Use the following commands: ```bash docker compose down docker compose up -d ``` These steps should help resolve the issue and allow you to upload files larger than 1MB successfully. If the problem persists, consider using a code node to handle the file upload process, as some users have found this approach to be effective <sup>[[3]](https://github.com/langgenius/dify/issues/12216)</sup>. <!-- 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/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c796dbd7-6606-420a-8343-59302da5525f?feedback_type=other)</sup>
Author
Owner

@ywf commented on GitHub (May 21, 2025):

I used the @dosubot method to solve this problem. thanks

docker/ssrf_proxy/squid.conf.template file by adding client_request_buffer_max_size 10240 KB
then
docker compose down
docker compose up -d

@ywf commented on GitHub (May 21, 2025): I used the @dosubot method to solve this problem. thanks docker/ssrf_proxy/squid.conf.template file by adding client_request_buffer_max_size 10240 KB then docker compose down docker compose up -d
Author
Owner

@dosubot[bot] commented on GitHub (May 21, 2025):

Great to hear that the solution worked for you! If you have any more questions or need further assistance, feel free to reach out. Happy coding!

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] commented on GitHub (May 21, 2025): <!-- Answer --> Great to hear that the solution worked for you! If you have any more questions or need further assistance, feel free to reach out. Happy coding! <!-- 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/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/66e76892-d181-4f64-a24d-e0cfce6d8a62?feedback_type=other)</sup>
Author
Owner

@liu731 commented on GitHub (Jun 25, 2025):

I have the same problem on cloud hosting, how can I fix it? I am a Pro paid user.

@crazywoola

@liu731 commented on GitHub (Jun 25, 2025): I have the same problem on cloud hosting, how can I fix it? I am a Pro paid user. @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14065