An exception in calling the plugin caused the coroutine pool to be full, triggering a 504 error #199

Closed
opened 2026-02-16 00:20:28 -05:00 by yindo · 2 comments
Owner

Originally created by @devenami on GitHub (Oct 29, 2025).

Self Checks

To make sure we get to you in time, please check the following :)

  • 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."

Versions

  1. dify-plugin-daemon Version 0.2.0
  2. dify-api Version 1.7.1

Describe the bug
An exception occurred while calling the plugin, causing the coroutine pool to become full and triggering a 504 error.

The pluginDaemonResponse is submitted to the coroutine pool to wait for the plugin's response. However, the process that invokes the plugin by writing data has already terminated, so pluginDaemonResponse never receives the data. When the request times out, the server will response "killed by timeout".

To Reproduce
Steps to reproduce the behavior:

  1. Force the plugin to shut down; no data will be received.
  2. Invoke the LLM via API.
  3. Call the /health/check API and check the size of the coroutine pool.
  4. The API timeout and responds with "killed by timeout".

Expected behavior
Respond quickly and fail fast when a plugin invocation error occurs.

Screenshots

Additional context

Originally created by @devenami on GitHub (Oct 29, 2025). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/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." **Versions** 1. dify-plugin-daemon Version 0.2.0 2. dify-api Version 1.7.1 **Describe the bug** An exception occurred while calling the plugin, causing the coroutine pool to become full and triggering a 504 error. The pluginDaemonResponse is submitted to the coroutine pool to wait for the plugin's response. However, the process that invokes the plugin by writing data has already terminated, so pluginDaemonResponse never receives the data. When the request times out, the server will response "killed by timeout". **To Reproduce** Steps to reproduce the behavior: 1. Force the plugin to shut down; no data will be received. 2. Invoke the LLM via API. 3. Call the /health/check API and check the size of the coroutine pool. 4. The API timeout and responds with "killed by timeout". **Expected behavior** Respond quickly and fail fast when a plugin invocation error occurs. **Screenshots** **Additional context**
yindo closed this issue 2026-02-16 00:20:28 -05:00
Author
Owner

@NieRonghua commented on GitHub (Nov 6, 2025):

I encountered the same problem. I tried your method, and I hope it will solve my problem.

@NieRonghua commented on GitHub (Nov 6, 2025): I encountered the same problem. I tried your method, and I hope it will solve my problem.
Author
Owner

@NieRonghua commented on GitHub (Nov 6, 2025):

good job

@NieRonghua commented on GitHub (Nov 6, 2025): good job
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#199