mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-21 17:25:23 -04:00
PluginDaemonInternalServerError: killed by timeout #117
Closed
opened 2026-02-16 00:19:54 -05:00 by yindo
·
12 comments
No Branch/Tag Specified
main
build/fix-serverless-runtime-error-propagation
gh-pages
build/test-document2
build/test-document
build/onboarding-ui
build/slim-extract
codex/depot-builds
codex/mac-runner-benchmark
feat/storage-path-prefix
feat/multi-db-user
feat/slim-action
deploy/dev
feat/dify-cli
feat/add-e2e
build/pg-bouncer
codex/add-multimodal-rerank-and-embedding-apis
refactor/local-runtime
build/multimodal-embeddings
codex/refactor-routine.submit-label-handling
codex/refactor-service-layer-based-on-provided-plan
feat/trigger-response
feat/trigger
build/trigger
deploy/trigger-dev
codex/remove-claude-code-reviewer-from-github-ci
codex/add-manifest-check-to-upload-endpoint
feat/no-root-dockerfile
fix/json-schema
fix/blocking-anthorized-langgenius
454-bump-cli-template
build/datasource
feat/datasource
bump-cloud-kit
feat/rag-tag
fix/change-session-not-found-to-400
feat/plugin-readme
add-claude-github-actions-1756274550417
docs/comprehensive-development-documentation
chore/remove-json-schema-validation-error
71cef04
fix/missing-parameter-type
fix/sessions-log
fix/template.env
bump/go-git
build/oauth
feat/oauth-refresh-token
feat/plugin-oauth
feat/tool-oauth-cli
build/plugin-oauth
feat/readme-i18n
fix/memory-leak
feat/icon-dark
feat/default-icon
plugin_launch_concurent
feat/collect-active-requests
feat/dark-icon
feat/support-structured-llm-output
feat/dynamic-selector
fix/reduce-logs
feat/decode-plugin-package
feat/db-extras
fix/backwards-invocation-overflow
feat/length-prefixed-chunking
fix/http-request-reader-header
chore/unify-configurations
fix/hardcoded-serverless-runtime-timeout
fix/cmd
fix/signature
refactor/implement-gen-routes
fix/redis-lock
refactor/codegen
feat/add-authorized-category
chore/style
feat/run-plugin-cli
reduce/run-once
feat/reinstall-serverless-runtime
feat/support-setup-process
fix/apply-stdio-buffer-size
chore/add-warning-messages-to-installed-bucket
feat/repo
enhance/stdio
feat/make-buffer-size-configurable
fix/moderation-init
fix/only-validate-profile-on-quick-mode
feat/support-quick-init-plugins
refactor/oauth-parameters
feat/oauth
refactor/simplify-plugin-invocation
test/integration-test-for-plugins
fix/backwards-compatible-to-llm-result-chunk
feat/auto-scale
enhance/reduce-ci-tests
fix/cli-ci
enhance/removes-llm-result-prompt-messages
fix/disable-benchmark-logs
benchmark/local-runtime
chore/remove-useless-benchmark
feat/benchmark
feat/fetch-app-info
fix/windows-remap-assets
fix/skip-hidden-file
feat/stream-tool-blob-message
fix/path-travel
feat/template-add-ci
enhance/version-compare
feat/sign-apple-os-cli
feat/support-minimal-dify-version-required
refactor/stdip
feat/add-serverless-connector-launching-timeout
fix/remove-prompt_messages-from-llm-result-chunk
feat/standardize-plugin-sdk-versions
chore/update-docs-and-refine-wording
update/readme-cli
fix/infinity-environment-setup
fix/cbor-unmarshaling
fix/use-aws-iam-baseendpoint
fix/lost-query-params-in-endpoint
fix/tiktoken
cohre/update-readme
fix/redis-tests
fix/friendly-identity
fix/marshal-any-map
chore/upgrade-ants
fix/graceful-precompile
enhance/tiktoken
feat/graceful-shutdown
fix/close-serverless-response
fix/correct-cli-guide
fix/plugin-active-log
fix/remove-proxy-args-from-uv
fix/endpoint-hook-url
fix/ci-credentials
feat/disable-gevent
fix/add-gcc
fix/hardcoded-endpoint-timeout
fix/bump-cli-sdk-version
fix/deadloop-when-redis-disconnect
fix/enhence/speed-up-environment-setup
enhance/introduce-uv
fix/change-default-db
fix/deadlock
readme
chore/env.example
feat/add-action-in-url
fix/add-more-pip-args
fix/optimize-local-heartbeat
optimize/db-init
fix/optimize-internal-server-error
fix/increase-default-plugin-max-execution-timeout
fix/force-patch-older-version
enhance/increase-installing-process
LICENSE
fix/set-user-id-to-unrequired
fix/max-launching-concurrent
improve/error-handing-in-serverless
refactor/json-unmarshaler-enhancement
fix/add-pip-mirror-url
enhance/serverless-connector
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.3.0b1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.1-beta.23
0.0.1-beta.22
0.0.1-beta.21
0.0.1-beta.20
0.0.1-beta.19
0.0.1-beta.18
0.0.1-beta.17
0.0.1-beta.16
0.0.1-beta.15
0.0.1-beta.14
0.0.1-beta.13
0.0.1-beta.12
0.0.1-beta.11
0.0.1-beta.10
0.0.1-beta.9
0.0.1-beta.8
0.0.1-beta.7
0.0.1-beta.6
0.0.1-beta.5
0.0.1-beta.4
0.0.1-beta.3
0.0.1-beta.2
0.0.1-beta.1
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: langgenius/dify-plugin-daemon#117
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @luckylhb90 on GitHub (May 20, 2025).
dify-plugin-daemon version: master
The dify-plugin-daemon service is very unstable, and similar errors occur frequently. I think no similar situation was found in version 0.* before.
@luckylhb90 commented on GitHub (May 23, 2025):
After learning some code, I feel that it is related to python plugins. Because each of our plugins starts a process independently, and it is well known that python is not friendly enough to support multi-threading. If facing a large number of concurrent requests, I think the python process is very likely to be unable to handle them normally.
@Yeuoly @41tair
@41tair commented on GitHub (May 23, 2025):
The default execution timeout is 600 seconds. You can set the environment variable PLUGIN_MAX_EXECUTION_TIMEOUT to a higher value. Observe whether this reduces the occurrence of the related logs.
@luckylhb90 commented on GitHub (May 23, 2025):
Based on our experience of using version 0.*, in most cases our model won't run for such a long time. Therefore, I think that even if I modify it for a longer time, I still can't change this situation. Besides, even if I make the changes for a longer time, it will only lead to a longer execution of our task, won't it?
@41tair commented on GitHub (May 23, 2025):
I'm a bit confused and not entirely sure what the main issue you're facing is. Based on the comments above, I’m guessing the problem might be that the system is not still returning responses too quickly under high-concurrency scenarios. If that's the case, could you provide more detailed information, such as QPS or the plugin with version, so we can better analyze the issue?
@Yeuoly commented on GitHub (May 23, 2025):
I guess what you are talking about is
GIL, there is only one process instance for each plugin in community edtion, so that concurrent requests lead a performance issue like you said.Before we started, I'd like to know something about your environment, what's your TPS and what plugins are you running now? As I known, we've made some performance improvement in 0.0.10, what you said should not happen if it dose not exists in previous versions.
@luckylhb90 commented on GitHub (May 23, 2025):
Yes, I have taken the GIL issue into consideration, so could this become a bottleneck?
We have deployed version 0.0.10.
Then it seems that the TPS of our service is not high, approximately 10 to 20, but in fact, the request volume is very low.
We deployed the following plugins.
In fact, I have made a new discovery regarding the timeout issue. It might be caused by an anomaly in a certain plugin because it occasionally experiences timeout problems, which makes it very difficult for us to analyze.
/app/cwd/hjlarry/agent-0.0.1@f42a5a80b1c77fd0655c755b70ad08da47ceb1acc3638cf13a0eb9ed42b3a128/.venv/bin/python -m main /app/cwd/hjlarry/mcp-server-0.0.2@bcce460c6b12539bdc5ed39238e649c3124d3a6086222bbbe0a8807bed0e2591/.venv/bin/python -m main /app/cwd/junjiem/mcp_see_agent-0.1.0@2056b7f7cbe4265f1f8647ccb61c390246da9cc8d303548d14a337f3d3064879/.venv/bin/python -m main /app/cwd/junjiem/mcp_see_agent-0.1.7@43f9f41eb8f7d74cf5168b6c80d2136f4f79895744bb0a9205d1afa9230c54d3/.venv/bin/python -m main /app/cwd/junjiem/mcp_sse-0.1.6@9a06a9ca016e1927fda272e4c364c74e7846759d79785f98d14fd073eceaf753/.venv/bin/python -m main /app/cwd/langgenius/aws_tools-0.0.5@f87f7625757768621d3e39424e2d3f7737692305c4682dd240db0616536e4277/.venv/bin/python -m main /app/cwd/langgenius/azure_openai-0.0.14@165b7e3d62f84ab2c28c2082250ff31d189a8533924fc1e9378bd902392267c0/.venv/bin/python -m main /app/cwd/langgenius/azure_openai-0.0.16@e9ebc92e972ae473fc1c26ce215b88ba8780e44dab883685a61bf15e2c11a00d/.venv/bin/python -m main /app/cwd/langgenius/azuredalle-0.0.3@be0f1462517bff2bfafa56996d7d138056739259b9fd56f2070364c9b8d8fd73/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.10@caf9ec9ac745175b1ad88381dc9da0f8e876469b290ef1a27c6ed46ad16aec2f/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.12@73277b1810f8ef28410bb493e19604f742bee636b40dbd1e8fe7c776bbe73196/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.13@2b41a9801b3bec2697650e1d3fb02be270d1b742574ca48d2b2e6db503cf4d04/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.18@17174949d844a5491795f9f6732de4d15eb8c9e8c1c2cf804ce488f90c5c3322/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.18@af12ae0bf52866c1a81405adaa6020137bc2657f129cc6628022f1245d7c88ff/.venv/bin/python -m main /app/cwd/langgenius/bing-0.0.4@e69b2b474650cd94cffebedc8bf68614105e72932cdfd2e7b1b652d6662f44e3/.venv/bin/python -m main /app/cwd/langgenius/chart-0.0.2@fb391d9f13ca1d76ceb2596650dd5f4b7b4b5e97a0be16cb22ed132d98a07f7f/.venv/bin/python -m main /app/cwd/langgenius/dalle-0.0.4@c0d3625ef2fe13b8e8f6125fb4335822904d382e9c65e592f0d44dca037e3f6a/.venv/bin/python -m main /app/cwd/langgenius/deepseek-0.0.5@fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403/.venv/bin/python -m main /app/cwd/langgenius/dropbox-0.0.1@97824c380e70f5dce0e8c8c4d814311e85a0854661caa294f0ebc201fc500df7/.venv/bin/python -m main /app/cwd/langgenius/duckduckgo-0.0.5@dcefef02ee5bffdc6587b519e92b0247bed871881f05a756277f24a516f136f4/.venv/bin/python -m main /app/cwd/langgenius/email-0.0.6@b81c6c1277c5da6b0a645e177967baed02e68b8ae85169fd25c90c4f2af8f9fb/.venv/bin/python -m main /app/cwd/langgenius/email-0.0.7@7c7284565f153155516412e6d77d72ebf7ecd380808b908a65d793267516a4c5/.venv/bin/python -m main /app/cwd/langgenius/feishu_message-0.0.1@013b295e4bd0f6f5850cf529e3ec3078a31d07e061a5640a9c87e313ea11bf62/.venv/bin/python -m main /app/cwd/langgenius/feishu_spreadsheet-0.0.1@6b4da2c3bcab1aace954e92a8120bf09692951bc68c993debbd64cfb398fd30d/.venv/bin/python -m main /app/cwd/langgenius/firecrawl-0.0.3@d668b3ad841e8bb27f735a8500568e44f9673156d1d4db72c304d0437bf80fd7/.venv/bin/python -m main /app/cwd/langgenius/github-0.0.5@431d6d7751f88622e508b913f604edc8c1765e9a6d90d6fa15aea92b627e7676/.venv/bin/python -m main /app/cwd/langgenius/google-0.0.8@3efcf55ffeef9d0f77715e0afb23534952ae0cb385c051d0637e86d71199d1a6/.venv/bin/python -m main /app/cwd/langgenius/google-0.0.9@078f20e08db9883c5deecde1c9665f00dbc45ae5b4aabcae4f091089e9f6eadf/.venv/bin/python -m main /app/cwd/langgenius/google_translate-0.0.2@1ebb3d28ec6eced92ec93ab085afc77ac34d9468ab9f64c98e2f8ed5021c93fe/.venv/bin/python -m main /app/cwd/langgenius/huggingface_tei-0.0.3@0f766f5922e5714736fb8451e687664ea9c698acb9bbd468eccb036282f77683/.venv/bin/python -m main /app/cwd/langgenius/huggingface_tei-0.0.3@cbf6225ca0f97b13975f09c8f6a1707dda136fa033300b3a41d7bd9cc8f700d5/.venv/bin/python -m main /app/cwd/langgenius/jina-0.0.6@3ac399c96509b3bfe3124f9cdfa13999cb2f7d7ff00a99cc8d3ac4f4d82ffe6c/.venv/bin/python -m main /app/cwd/langgenius/jina_tool-0.0.7@51cf3dfcc4ff002171f2378aa02ec7ce5390ddfe23c02ede532b08f48a75e82c/.venv/bin/python -m main /app/cwd/langgenius/json_process-0.0.2@7afb534cc85b28a8e9c7f9410d1cfc31fb7bd3950023355a37059dbe809ac776/.venv/bin/python -m main /app/cwd/langgenius/ollama-0.0.5@cc38c90a58d4b4e43c9a821d352829b2c2a8d6d742de9fec9e61e6b34865b496/.venv/bin/python -m main /app/cwd/langgenius/ollama-0.0.6@7d66a960a68cafdcdf5589fdf5d01a995533f956853c69c54eddcf797006fa37/.venv/bin/python -m main /app/cwd/langgenius/openai-0.0.19@6b2b2e115b1b9d34a63eb26fadcc33d74330fd2ec06071bb30b8a24b1fab107a/.venv/bin/python -m main /app/cwd/langgenius/openai-0.0.22@fa668d0ec3b434270453ede311196acaad0531ad9e3d5561cd622e6508cd3254/.venv/bin/python -m main /app/cwd/langgenius/openai_api_compatible-0.0.13@3c545e99d84bd870a5bc673d66e206e8704f9b71c9e4eb83459bc75b8352d738/.venv/bin/python -m main /app/cwd/langgenius/openai_api_compatible-0.0.16@77274df8fe2632cac66bfd153fcc75aa5e96abbe92b5c611b8984ad9f4cd4457/.venv/bin/python -m main /app/cwd/langgenius/openllm-0.0.2@4e5440508ce792e3d973e7e05a8172fe7ab5fbbfdfcfd7c26ab7299344853318/.venv/bin/python -m main /app/cwd/langgenius/perplexity-1.0.0@cb662f8a44deefb34239e5e600816f95174f235664fe69a5f0a69e4c8675766c/.venv/bin/python -m main /app/cwd/langgenius/podcast_generator-0.0.3@d05fc9f85221a19e72176c8f42dcd17dfcc1326411feb1edced0169c2782e5da/.venv/bin/python -m main /app/cwd/langgenius/sagemaker-0.0.6@f69820cffa1d29054b013012d7713d2c94fb0c42ebce9448132cfd9ef6a87568/.venv/bin/python -m main /app/cwd/langgenius/searchapi-0.0.2@665b4d71daa29fb015035b4affde2d97c6047209ee1a310420e9d118974551f8/.venv/bin/python -m main /app/cwd/langgenius/serper-0.0.2@4e0d70360c68b17b7504b65f6f14ecd00a40b8b138b716ff72f3bfd8139961ab/.venv/bin/python -m main /app/cwd/langgenius/siliconflow_tool-0.0.4@79df250b67a952dbd9c724c6a8b37032bae6c8f83cda88a0309508be9aa80642/.venv/bin/python -m main /app/cwd/langgenius/siliconflow_tool-0.0.5@997a1c442488f81930d401a4a7292d23415ec0dcf7a3bca14e13d845ecfdd2b0/.venv/bin/python -m main /app/cwd/langgenius/spider-0.0.2@1f800653747430d0791387dc84f27de0fadba2ceadce8251fcce2a8cde808611/.venv/bin/python -m main /app/cwd/langgenius/tavily-0.0.5@caf7214ca1a237845e991615fd12e04c8db8b703d59773538fe243f3de4044e9/.venv/bin/python -m main /app/cwd/langgenius/tongyi-0.0.18@ca40ec06ff35ca611fa5fdf99a15eeb007a9fe3bd725c9ff6d0436469ab0edc9/.venv/bin/python -m main /app/cwd/langgenius/transcript-0.0.2@aa792aa9b1f954aabedc631e2b2ecf61bd417c78b64dff62973b963fd8bf45e5/.venv/bin/python -m main /app/cwd/langgenius/vectorizer-0.0.2@5213191fd5d455b36f4ca7bdf4729e4baad1d5003074d5eaa9baa1df8e1729bd/.venv/bin/python -m main /app/cwd/langgenius/vertex_ai-0.0.14@e582f469a0d3aa09c3f5c866d009e7d580484e866b2207a98bbd8fe31eb2b45b/.venv/bin/python -m main /app/cwd/langgenius/vertex_ai-0.0.9@bd63a7d365d61e335607cd84cffbd92ec66ceae0956a044407eea6c3147ba17e/.venv/bin/python -m main /app/cwd/langgenius/volcengine_maas-0.0.10@ba0a7fc3151e89bf8645cd3abb3ccff971ee59e5b1127efca50b092dbb93bf80/.venv/bin/python -m main /app/cwd/langgenius/volcengine_maas-0.0.14@287c49e4e33dea665c74e1f14692ac8b88d1b432864ee89d796b33f410bdaff0/.venv/bin/python -m main /app/cwd/langgenius/wikipedia-0.0.3@c15c50172ae5abf681847180509a8df32d5944c3be3c91066d61c931b82b3470/.venv/bin/python -m main /app/cwd/langgenius/yahoo-0.0.3@5e9b2a43c66a6b74d1d48278edd625f8bc9d9c177ff170df309309c11d8a693f/.venv/bin/python -m main /app/cwd/langgenius/yahoo-0.0.4@251cb9671af71cde1acdb921b9d2dbe1225986e3da7cc29c9470c24be7f7c885/.venv/bin/python -m main /app/cwd/langgenius/youtube-0.0.2@d8a2a859b2868a436069330b728afeb03c78393c142343397f97226b8da8e503/.venv/bin/python -m main /app/cwd/liujicheng/aliyun_tool-0.0.1@cfac4caa162add082d9ef4a776486c21fa3818a5306604106acf87c57ef88873/.venv/bin/python -m main /app/cwd/yangyaofei/vllm-0.1.4@b9d34bbf01875405571bb829f9e275faeaf832b869a401f9757be48acfb509e8/.venv/bin/python -m main /app/cwd/yoshiki-0428/google_drive-0.0.1@5c17eb6413e263c214a7c59e4581d528658d90d886319687033d59416eaef96e/.venv/bin/python -m main /app/cwd/langgenius/bedrock-0.0.13@b8a91de5c23504d9d3e838f73ef84aca936617c3005a9d2792757c90ba9445ed/.venv/bin/python -m main@Mymelodyxt commented on GitHub (May 28, 2025):
We also encountered the same problem. The concurrency volume is not very large. Is there any general solution?
@luckylhb90 commented on GitHub (May 28, 2025):
I haven't found a solution. There are problems with this architecture itself.
@41tair commented on GitHub (Jun 11, 2025):
@luckylhb90 @Mymelodyxt We've added the documentation for the SRI (Serverless Runtime Interface). You can check it out here:
👉 https://github.com/langgenius/dify-plugin-daemon/blob/main/docs/runtime/sri.md. Hope this helps.
@luckylhb90 commented on GitHub (Jun 15, 2025):
wa, cool, thank you so much ~~
@hbzheng3 commented on GitHub (Oct 10, 2025):
We also encountered the same problem. The concurrency volume is not very large. Is there any general solution?
@fatelei commented on GitHub (Jan 11, 2026):
Option 1: Increase the timeout via environment variable:
export PLUGIN_MAX_EXECUTION_TIMEOUT=1200 # 20 minutes
Option 2: Investigate why the plugin invocations (/dispatch/llm/invoke, /dispatch/model/schema) are taking so long. The issue could be: