Page loading failed after calling API #15283

Closed
opened 2026-02-21 19:21:01 -05:00 by yindo · 1 comment
Owner

Originally created by @lixc123 on GitHub (Jul 11, 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.5.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Calling dify's send messages (/chat messages) interface through the API will timeout, and the web page will not open and keep loading. Restarting Docker will work normally, or it may take a few minutes to recover

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @lixc123 on GitHub (Jul 11, 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.5.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Calling dify's send messages (/chat messages) interface through the API will timeout, and the web page will not open and keep loading. Restarting Docker will work normally, or it may take a few minutes to recover <img width="853" height="511" alt="Image" src="https://github.com/user-attachments/assets/41d4157e-ec1a-4429-aa07-40ed56d55c9b" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:21:01 -05:00
yindo closed this issue 2026-02-21 19:21:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 11, 2025):

Based on your description and recent code changes, the most likely causes for the /chat messages API timeout and infinite page loading are resource exhaustion (especially Redis), rate limiting, or backend service failures. This is supported by similar reports where Redis connection failures or resource limits led to 503 errors and timeouts, which were temporarily resolved by restarting Docker containers [1].

Here are some focused troubleshooting steps:

  • Check backend, frontend, and Docker logs when the issue occurs. Look for Redis errors, rate limiting exceptions, 500/503 responses, or authentication/session issues.
  • Monitor Redis container health, memory, and logs for connection failures or resource exhaustion. Enabling Redis persistence and retry mechanisms can help with stability [2].
  • Review your docker-compose.yml and environment variables for CORS and API URL settings. Mismatched or overly permissive CORS settings can cause infinite loading [3].
  • Watch CPU, memory, and thread usage in all containers, especially backend and Redis, to catch resource exhaustion or thread leaks.
  • Make sure your frontend and backend are both using the latest JWT-based Bearer token authentication, as recent changes require alignment here [4].
  • If you’re using custom models or plugins, slow downloads or network issues can also cause timeouts. Setting a PIP mirror and checking network connectivity may help [5].
  • Recent bug fixes addressed 500 errors and improved Redis fallback handling, so ensure your deployment includes these updates [6] [7].

If these steps don’t reveal the cause, consider increasing logging or enabling observability features to capture more detailed traces during failures. If you can share relevant log excerpts or resource stats from the time of failure, I can help you dig deeper.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Jul 11, 2025): <!-- Answer --> Based on your description and recent code changes, the most likely causes for the /chat messages API timeout and infinite page loading are resource exhaustion (especially Redis), rate limiting, or backend service failures. This is supported by similar reports where Redis connection failures or resource limits led to 503 errors and timeouts, which were temporarily resolved by restarting Docker containers [[1]](https://github.com/langgenius/dify/issues/21165). Here are some focused troubleshooting steps: - Check backend, frontend, and Docker logs when the issue occurs. Look for Redis errors, rate limiting exceptions, 500/503 responses, or authentication/session issues. - Monitor Redis container health, memory, and logs for connection failures or resource exhaustion. Enabling Redis persistence and retry mechanisms can help with stability [[2]](https://github.com/langgenius/dify/blob/1d85979a7464d8d4d01e582eb6083d4206ea46ba/api/extensions/ext_redis.py). - Review your docker-compose.yml and environment variables for CORS and API URL settings. Mismatched or overly permissive CORS settings can cause infinite loading [[3]](https://github.com/langgenius/dify/issues/19741). - Watch CPU, memory, and thread usage in all containers, especially backend and Redis, to catch resource exhaustion or thread leaks. - Make sure your frontend and backend are both using the latest JWT-based Bearer token authentication, as recent changes require alignment here [[4]](https://github.com/langgenius/dify/pull/1212). - If you’re using custom models or plugins, slow downloads or network issues can also cause timeouts. Setting a PIP mirror and checking network connectivity may help [[5]](https://github.com/langgenius/dify/issues/16868). - Recent bug fixes addressed 500 errors and improved Redis fallback handling, so ensure your deployment includes these updates [[6]](https://github.com/langgenius/dify/pull/20794) [[7]](https://github.com/langgenius/dify/pull/21044). If these steps don’t reveal the cause, consider increasing logging or enabling observability features to capture more detailed traces during failures. If you can share relevant log excerpts or resource stats from the time of failure, I can help you dig deeper. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0457ab1d-4fdb-419e-9385-8fccd38554f8?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/22235)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15283