mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Word文档批注插件运行报错 #939
Reference in New Issue
Block 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 @AI-Hao07 on GitHub (Jan 17, 2026).
Self Checks
Dify version
v1.11.1
Plugin version
word工具
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
word文档进行批注时,文档过大,执行到5min就会报错。5min内能够正常运行。
✔️ Error log
`
2026-01-17 04:40:57.927 ERROR [GraphWorker-0] [base.py:156] - Stream request to Plugin Daemon Service failed
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
yield
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 236, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
raise exc from None
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
response = connection.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 103, in handle_request
return self._connection.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 136, in handle_request
raise exc
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 106, in handle_request
) = self._receive_response_headers(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 177, in _receive_response_headers
event = self._receive_event(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 217, in _receive_event
data = self._network_stream.read(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 126, in read
with map_exceptions(exc_map):
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ReadTimeout: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/api/core/plugin/impl/base.py", line 145, in _stream_request
with httpx.stream(**stream_kwargs) as response:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_api.py", line 172, in stream
with client.stream(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 880, in stream
response = self.send(
^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 926, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 954, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 991, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1027, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 235, in handle_request
with map_httpcore_exceptions():
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout: timed out
2026-01-17 04:40:57.930 ERROR [GraphWorker-0] [node.py:329] - Node 1766391460438 failed to run
Traceback (most recent call last):
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions
yield
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 236, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
raise exc from None
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
response = connection.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 103, in handle_request
return self._connection.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 136, in handle_request
raise exc
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 106, in handle_request
) = self._receive_response_headers(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 177, in _receive_response_headers
event = self._receive_event(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_sync/http11.py", line 217, in _receive_event
data = self._network_stream.read(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 126, in read
with map_exceptions(exc_map):
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/app/api/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ReadTimeout: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/api/core/plugin/impl/base.py", line 145, in _stream_request
with httpx.stream(**stream_kwargs) as response:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_api.py", line 172, in stream
with client.stream(
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 880, in stream
response = self.send(
^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 926, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 954, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 991, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1027, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 235, in handle_request
with map_httpcore_exceptions():
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit
self.gen.throw(value)
File "/app/api/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/api/core/workflow/nodes/base/node.py", line 319, in run
for event in result:
^^^^^^
File "/app/api/core/workflow/nodes/tool/tool_node.py", line 132, in _run
_ = yield from self._transform_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/workflow/nodes/tool/tool_node.py", line 251, in _transform_message
for message in message_stream:
^^^^^^^^^^^^^^
File "/app/api/core/tools/utils/message_transformer.py", line 67, in transform_tool_invoke_messages
for message in messages:
^^^^^^^^
File "/app/api/core/callback_handler/workflow_tool_callback_handler.py", line 21, in on_tool_execution
for tool_output in tool_outputs:
^^^^^^^^^^^^
File "/app/api/core/tools/plugin_tool/tool.py", line 36, in _invoke
yield from manager.invoke(
File "/app/api/core/plugin/utils/chunk_merger.py", line 50, in merge_blob_chunks
for resp in response:
^^^^^^^^
File "/app/api/core/plugin/impl/base.py", line 256, in _request_with_plugin_daemon_response_stream
for line in self._stream_request(method, path, params, headers, data, files):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/plugin/impl/base.py", line 157, in _stream_request
raise PluginDaemonInnerError(code=-500, message="Request to Plugin Daemon Service failed")
core.plugin.entities.plugin_daemon.PluginDaemonInnerError
2026-01-17 04:40:57.933 ERROR [GraphDispatcher] [error_handler.py:101] - Node 1766391460438 failed with ABORT strategy:
2026-01-17 04:40:58.039 ERROR [Thread-63 (_generate_worker)] [workflow_entry.py:111] - Unknown Error when workflow entry running
Traceback (most recent call last):
File "/app/api/core/workflow/workflow_entry.py", line 107, in run
yield from generator
File "/app/api/core/workflow/graph_engine/graph_engine.py", line 270, in run
raise self._graph_execution.error
RuntimeError
`
@dosubot[bot] commented on GitHub (Jan 17, 2026):
你的问题是由于默认的插件守护进程(Plugin Daemon)超时时间设置为 5 分钟(300 秒),大文件批注时处理时间超过了这个限制,导致 httpx.ReadTimeout 报错。你可以通过以下方式解决:
在
.env文件或docker-compose.yaml的 API 服务环境变量中增加或修改:(单位为秒,可根据实际需要调整更大)
保存后,重启所有 Dify 相关的 Docker 容器让配置生效。
如果依然报错,检查你的反向代理(如 Nginx)、Docker 网络等是否有其它超时限制。
参考:官方讨论与配置说明
如需处理更大文件,建议监控服务器资源,必要时可将文档拆分处理。
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@fatelei commented on GitHub (Jan 17, 2026):
which plugin