Agent strategy run cut by PLUGIN_MAX_EXECUTION_TIMEOUT is reported only as "Internal Server Error"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
Direzione di ricerca
Start at the <-timer.C branch in internal/service/base_sse.go, where the timeout currently calls exception.InternalServerError, then read internal/types/exception/factory.go to see how error types and messages are built. Reproduce by setting a short PLUGIN_MAX_EXECUTION_TIMEOUT and running a long agent strategy dispatch. Done means a timeout returns its own error type and message naming the configured limit, while client disconnects and real internal errors keep their existing types.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- dify-plugin-daemon Version: 0.6.14-local
- dify-api Version: 1.19.0 (self-hosted docker-compose). The same defaults and code path are present in 1.20.0 and in current
mainof this repo.
Agent strategy plugin: langgenius/agent 0.0.51 (Function Calling). Model plugin: langgenius/openai_api_compatible 0.0.84.
Describe the bug
PLUGIN_MAX_EXECUTION_TIMEOUT (default 600) caps the whole dispatch/agent_strategy/invoke stream, so it is effectively the maximum total runtime of an Agent node in a workflow, not just a single model or tool call. That limit by itself is reasonable and configurable. The problem is how it is reported.
When the timer fires, baseSSEService writes exception.InternalServerError(errors.New("killed by timeout")) (internal/service/base_sse.go, the <-timer.C branch). InternalServerError logs the real reason and returns the fixed message "Internal Server Error" (internal/types/exception/factory.go). The workflow therefore fails with only:
req_id: <id> PluginDaemonInternalServerError: Internal Server Error
Nothing in the run tells the user that a time limit was reached, or which setting controls it. The reason is visible only in the daemon's own log:
ERROR dify-plugin-daemon factory.go:28 PluginDaemonInternalServerError error="killed by timeout"
Many people hit this generic message and it gets mixed up with other causes, for example #760 (a stream that never closes) and #371 / #290. A run that really is long and a run that hangs look identical from the Dify side.
To Reproduce
- Self-hosted docker-compose with default plugin daemon settings (
PLUGIN_MAX_EXECUTION_TIMEOUT=600). - Create a workflow
Start → Agent (Function Calling, Maximum Iterations 30) → End. Give the Agent one API tool that takes 50 s per call, and a model that keeps calling the tool, about 22 calls (~18 minutes in total). Every individual model and tool call is well under its own per-call timeout. - Run the workflow through the API in streaming mode.
- The Agent node fails at 600.2 s with
PluginDaemonInternalServerError: Internal Server Error. The daemon log showskilled by timeout. - Set
PLUGIN_MAX_EXECUTION_TIMEOUT=2400on the plugin daemon, restart it and run the same workflow again: it succeeds in 1101 s.
Expected behavior
- When the execution timer fires, return a timeout-specific error type and message that the API can pass on to the user. For example:
plugin execution exceeded PLUGIN_MAX_EXECUTION_TIMEOUT (600s). A client disconnect or a real internal error would keep its own type. - Document, next to
PLUGIN_MAX_EXECUTION_TIMEOUTin the env examples, that it also limits the total runtime of an Agent node (the whole agent strategy run), so long-running agents need it raised.
Screenshots
N/A
Additional context
The test used a mock OpenAI-compatible model endpoint and a mock HTTP tool, so model latency was not a factor. Raising only this one setting moved the cut-off, which confirms it is the limit that applies.
- Lingua principale
- Go
- Stelle
- 462
- Fork
- 326
- Merge medio
- 22h 15m
- PR unite (30g)
- 8
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di langgenius/dify-plugin-daemon
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
langgenius/dify-plugin-daemon#862 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(install): prevent mirror settings from changing dependency resolution inputsForse già presa @WH-2099 l’ha presa 5 giorni fa. Apertaproject#dify-plugin-daemon
langgenius/dify-plugin-daemon#860 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
READONLY error when using Redis 6.2.2 Sentinel cluster on Kubernetes with dify-plugin-daemon 0.6.10-localForse già presa @Souravrajvi0 l’ha presa 60 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
langgenius/dify-plugin-daemon#826 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
uninstall the plugin, but the plugin package is not removedForse già presa @fatelei l’ha presa 111 giorni fa. Apertabug plugin-daemon
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
langgenius/dify-plugin-daemon#797 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug plugin-daemon project#dify-plugin-daemon
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
langgenius/dify-plugin-daemon#771 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di langgenius/dify-plugin-daemon
Issue simili
-
test_archive_is_downloaded_after_logout_login doesn't wait for the storage client after loginAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
github/github-mcp-server#3960 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
JuliusBrussee/caveman#1594 ·
I maintainer di solito rispondono entro 1 giorno
-
C-bug O-community X-blathers-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
cockroachdb/cockroach#176264 · 1 commento ·