504 gateway time-out #13489

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

Originally created by @rxldgit on GitHub (Apr 28, 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.3.1

Cloud or Self Hosted

Cloud

Steps to reproduce

Image
As shown in the screenshot, when testing the API call using Postman, the response "504 gateway time-out" is received. However, when testing and running the workflow directly on the cloud, it is normal.

✔️ Expected Behavior

Received a normal response.

Actual Behavior

Received a "504 gateway time-out" response.

Originally created by @rxldgit on GitHub (Apr 28, 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.3.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/f0dd9e00-10bf-40f3-9944-a7c072f9f9d5) As shown in the screenshot, when testing the API call using Postman, the response "504 gateway time-out" is received. However, when testing and running the workflow directly on the cloud, it is normal. ### ✔️ Expected Behavior Received a normal response. ### ❌ Actual Behavior Received a "504 gateway time-out" response.
yindo added the 🐞 bug🤔 cant-reproducecloud labels 2026-02-21 19:12:22 -05:00
yindo closed this issue 2026-02-21 19:12:22 -05:00
Author
Owner

@rxldgit commented on GitHub (Apr 28, 2025):

Could someone help me?

@rxldgit commented on GitHub (Apr 28, 2025): Could someone help me?
Author
Owner

@dosubot[bot] commented on GitHub (Apr 28, 2025):

Hello @rxldgit! I'm Dosu, a bot here to help you with bugs, questions, and becoming a contributor. I'm ready to assist you while we wait for a human maintainer. How can I help you today?

It seems you're experiencing a "504 Gateway Time-out" error when making API calls to the Dify endpoint using Postman. This issue can be caused by heavy traffic or temporary connectivity problems on the server. The development team is aware of these performance issues and is planning an upgrade to address them. In the meantime, you might try waiting and retrying the request later.

Additionally, you can check the timeout settings in your environment. The Dify API allows configuration of several timeout-related environment variables, such as GUNICORN_TIMEOUT, which can be increased to support longer-lasting connections.

For further assistance, it might be helpful to loop in a maintainer. @crazywoola, could you provide some guidance on this issue?

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 (Apr 28, 2025): <!-- Greeting --> Hello @rxldgit! I'm [Dosu](https://dosu.dev), a bot here to help you with bugs, questions, and becoming a contributor. I'm ready to assist you while we wait for a human maintainer. How can I help you today? <!-- Answer --> It seems you're experiencing a "504 Gateway Time-out" error when making API calls to the Dify endpoint using Postman. This issue can be caused by heavy traffic or temporary connectivity problems on the server. The development team is aware of these performance issues and is planning an upgrade to address them. In the meantime, you might try waiting and retrying the request later. Additionally, you can check the timeout settings in your environment. The Dify API allows configuration of several timeout-related environment variables, such as `GUNICORN_TIMEOUT`, which can be increased to support longer-lasting connections. For further assistance, it might be helpful to loop in a maintainer. @crazywoola, could you provide some guidance on this issue? <!-- 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/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a8a6efa1-93e6-488e-9ac3-12396e96ba03?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 28, 2025):

Sorry, I just tried the API endpoint, it works as expected.

Can you provide more details?

If you see a cf 504 gateway timeout, then you can try it later in 5min maybe.

@crazywoola commented on GitHub (Apr 28, 2025): Sorry, I just tried the API endpoint, it works as expected. Can you provide more details? If you see a cf 504 gateway timeout, then you can try it later in 5min maybe.
Author
Owner

@rxldgit commented on GitHub (Apr 28, 2025):

Sorry, I just tried the API endpoint, it works as expected.

Can you provide more details?

If you see a cf 504 gateway timeout, then you can try it later in 5min maybe.

Image
I found that the API log said that the call was successful. So why did I still receive a 504 error? I tried it several times and it was the same.

@rxldgit commented on GitHub (Apr 28, 2025): > Sorry, I just tried the API endpoint, it works as expected. > > Can you provide more details? > > If you see a cf 504 gateway timeout, then you can try it later in 5min maybe. ![Image](https://github.com/user-attachments/assets/539d92fa-95cb-43a5-8004-db094a85b2a5) I found that the API log said that the call was successful. So why did I still receive a 504 error? I tried it several times and it was the same.
Author
Owner

@rxldgit commented on GitHub (Apr 28, 2025):

I understand that sometimes I need to use streaming output. Because I used blocking output, which caused this problem.

@rxldgit commented on GitHub (Apr 28, 2025): I understand that sometimes I need to use streaming output. Because I used blocking output, which caused this problem.
Author
Owner

@zhaobbc123 commented on GitHub (Jul 8, 2025):

Hello, how was this issue resolved? I'm encountering the same problem.

@zhaobbc123 commented on GitHub (Jul 8, 2025): Hello, how was this issue resolved? I'm encountering the same problem.
Author
Owner

@zhaobbc123 commented on GitHub (Jul 8, 2025):

Hello, how was this issue resolved? I'm encountering the same problem.

@zhaobbc123 commented on GitHub (Jul 8, 2025): Hello, how was this issue resolved? I'm encountering the same problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13489