Database plugin error #13041

Closed
opened 2026-02-21 19:10:17 -05:00 by yindo · 3 comments
Owner

Originally created by @9264Yf on GitHub (Apr 17, 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.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

[ERROR]PluginDaemonInternalServerError: killed by timeout

goroutine 229 [running]:

runtime/debug.Stack()

	/usr/local/go/src/runtime/debug/stack.go:26 +0x5e

github.com/langgenius/dify-plugin-daemon/internal/types/exception.InternalServerError({0x1a92700, 0xc000874ed0})

	/app/internal/types/exception/factory.go:27 +0x27

github.com/langgenius/dify-plugin-daemon/internal/service.baseSSEService[...](0xc000699128, 0x185607d, 0x258?)

	/app/internal/service/base_sse.go:81 +0x4c6

github.com/langgenius/dify-plugin-daemon/internal/service.InvokeTool(0xc000acf8c0, 0xc0004e1000, 0x258)

	/app/internal/service/invoke_tool.go:35 +0x17c

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeTool.func4.1({{{0xc00004bc2d, 0x24}, {0xc0007f56b0, 0x24}}, {{0x0, 0x0}}, {0xc00004f140, 0x57}, 0x0, 0x0, ...})

	/app/internal/server/controllers/tool.go:20 +0x89

github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindPluginDispatchRequest[...].func1()

	/app/internal/server/controllers/base.go:53 +0x9b

github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindRequest[...](0xc0004e1000, 0xc0006993a0)

	/app/internal/server/controllers/base.go:31 +0x262

github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindPluginDispatchRequest[...](0x186476d?, 0xa?)

	/app/internal/server/controllers/base.go:37 +0x36

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeTool.func4(0xc0004e1000)

	/app/internal/server/controllers/tool.go:17 +0x74

github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).InitClusterID.func3(0xc0004e1000)

	/app/internal/server/middleware.go:170 +0x54

github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).RedirectPluginInvoke.func2(0xc0004e1000)

	/app/internal/server/middleware.go:97 +0x74

github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).FetchPluginInstallation.func1(0xc0004e1000)

	/app/internal/server/middleware.go:66 +0x2d2

github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b

github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginGroup.CheckingKey.func1(0xc0004e1000)

	/app/internal/server/middleware.go:24 +0x95

github.com/gin-gonic/gin.(*Context).Next(...)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185

github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 +0x6f

github.com/gin-gonic/gin.(*Context).Next(...)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185

github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 +0xe5

github.com/gin-gonic/gin.(*Context).Next(...)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185

github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0001ef040, 0xc0004e1000)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 +0x892

github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0001ef040, {0x1aa64d0, 0xc0001b49a0}, 0xc0000aa500)

	/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 +0x1b2

net/http.serverHandler.ServeHTTP({0x1a9b548?}, {0x1aa64d0?, 0xc0001b49a0?}, 0x6?)

	/usr/local/go/src/net/http/server.go:3210 +0x8e

net/http.(*conn).serve(0xc000aceb40, {0x1aa8d90, 0xc000464e10})

	/usr/local/go/src/net/http/server.go:2092 +0x5d0

created by net/http.(*Server).Serve in goroutine 36

	/usr/local/go/src/net/http/server.go:3360 +0x485

Database plugin error

✔️ Expected Behavior

normal use

Actual Behavior

No response

Originally created by @9264Yf on GitHub (Apr 17, 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.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` [ERROR]PluginDaemonInternalServerError: killed by timeout goroutine 229 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:26 +0x5e github.com/langgenius/dify-plugin-daemon/internal/types/exception.InternalServerError({0x1a92700, 0xc000874ed0}) /app/internal/types/exception/factory.go:27 +0x27 github.com/langgenius/dify-plugin-daemon/internal/service.baseSSEService[...](0xc000699128, 0x185607d, 0x258?) /app/internal/service/base_sse.go:81 +0x4c6 github.com/langgenius/dify-plugin-daemon/internal/service.InvokeTool(0xc000acf8c0, 0xc0004e1000, 0x258) /app/internal/service/invoke_tool.go:35 +0x17c github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeTool.func4.1({{{0xc00004bc2d, 0x24}, {0xc0007f56b0, 0x24}}, {{0x0, 0x0}}, {0xc00004f140, 0x57}, 0x0, 0x0, ...}) /app/internal/server/controllers/tool.go:20 +0x89 github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindPluginDispatchRequest[...].func1() /app/internal/server/controllers/base.go:53 +0x9b github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindRequest[...](0xc0004e1000, 0xc0006993a0) /app/internal/server/controllers/base.go:31 +0x262 github.com/langgenius/dify-plugin-daemon/internal/server/controllers.BindPluginDispatchRequest[...](0x186476d?, 0xa?) /app/internal/server/controllers/base.go:37 +0x36 github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.InvokeTool.func4(0xc0004e1000) /app/internal/server/controllers/tool.go:17 +0x74 github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).InitClusterID.func3(0xc0004e1000) /app/internal/server/middleware.go:170 +0x54 github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).RedirectPluginInvoke.func2(0xc0004e1000) /app/internal/server/middleware.go:97 +0x74 github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginDispatchGroup.(*App).FetchPluginInstallation.func1(0xc0004e1000) /app/internal/server/middleware.go:66 +0x2d2 github.com/gin-gonic/gin.(*Context).Next(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b github.com/langgenius/dify-plugin-daemon/internal/server.(*App).pluginGroup.CheckingKey.func1(0xc0004e1000) /app/internal/server/middleware.go:24 +0x95 github.com/gin-gonic/gin.(*Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/recovery.go:102 +0x6f github.com/gin-gonic/gin.(*Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/logger.go:249 +0xe5 github.com/gin-gonic/gin.(*Context).Next(...) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0001ef040, 0xc0004e1000) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:633 +0x892 github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0001ef040, {0x1aa64d0, 0xc0001b49a0}, 0xc0000aa500) /go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/gin.go:589 +0x1b2 net/http.serverHandler.ServeHTTP({0x1a9b548?}, {0x1aa64d0?, 0xc0001b49a0?}, 0x6?) /usr/local/go/src/net/http/server.go:3210 +0x8e net/http.(*conn).serve(0xc000aceb40, {0x1aa8d90, 0xc000464e10}) /usr/local/go/src/net/http/server.go:2092 +0x5d0 created by net/http.(*Server).Serve in goroutine 36 /usr/local/go/src/net/http/server.go:3360 +0x485 ``` Database plugin error ### ✔️ Expected Behavior normal use ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:10:18 -05:00
Author
Owner

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

To resolve the "PluginDaemonInternalServerError: killed by timeout" error in the Dify plugin when using version 1.2.0 on a self-hosted Docker setup, you can try the following solutions:

  1. Increase Timeout Settings: Modify your docker-compose.yaml file to increase the timeout for the plugin initialization. Add the following configuration:

    plugin_daemon:
      environment:
        PYTHON_ENV_INIT_TIMEOUT: 320
        PLUGIN_MAX_EXECUTION_TIMEOUT: 2400
    
  2. Use a Specific Plugin Daemon Image: Update your docker-compose.yaml file to use a specific plugin daemon image that may help address the timeout issue:

    plugin_daemon:
      image: langgenius/dify-plugin-daemon:e0672c3c1a6451437e8f4b63b260c8b0863c9c80-local
    

These changes can help prevent the error during plugin initialization and improve the stability of your setup. Make sure to restart your Docker containers after making these changes [1].

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 17, 2025): <!-- Answer --> To resolve the "PluginDaemonInternalServerError: killed by timeout" error in the Dify plugin when using version 1.2.0 on a self-hosted Docker setup, you can try the following solutions: 1. **Increase Timeout Settings**: Modify your `docker-compose.yaml` file to increase the timeout for the plugin initialization. Add the following configuration: ```yaml plugin_daemon: environment: PYTHON_ENV_INIT_TIMEOUT: 320 PLUGIN_MAX_EXECUTION_TIMEOUT: 2400 ``` 2. **Use a Specific Plugin Daemon Image**: Update your `docker-compose.yaml` file to use a specific plugin daemon image that may help address the timeout issue: ```yaml plugin_daemon: image: langgenius/dify-plugin-daemon:e0672c3c1a6451437e8f4b63b260c8b0863c9c80-local ``` These changes can help prevent the error during plugin initialization and improve the stability of your setup. Make sure to restart your Docker containers after making these changes <sup>[[1]](https://github.com/langgenius/dify/issues/15940)</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/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7ebe2308-f086-4a34-a9d4-bf663af11b32?feedback_type=other)</sup>
Author
Owner

@9264Yf commented on GitHub (Apr 17, 2025):

@dosu My other environments are also the same as mine, so there is no problem with the configuration. I pulled the official image of dify, but the plugin cannot be used.

@9264Yf commented on GitHub (Apr 17, 2025): @dosu My other environments are also the same as mine, so there is no problem with the configuration. I pulled the official image of dify, but the plugin cannot be used.
Author
Owner

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

Could you provide more details about your setup? Specifically, it would be helpful to know:

  1. The exact error message you're encountering when trying to use the plugin.
  2. Any logs or output from the Docker containers that might indicate what the issue is.
  3. The steps you've already taken to troubleshoot the problem.
  4. Any specific configurations or settings you have applied to your Docker setup.

This information will help in diagnosing the issue more effectively.

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 17, 2025): <!-- Answer --> Could you provide more details about your setup? Specifically, it would be helpful to know: 1. The exact error message you're encountering when trying to use the plugin. 2. Any logs or output from the Docker containers that might indicate what the issue is. 3. The steps you've already taken to troubleshoot the problem. 4. Any specific configurations or settings you have applied to your Docker setup. This information will help in diagnosing the issue more effectively. <!-- 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/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3033ee14-1cfc-4002-9d01-e2cc1046f716?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13041