OpenBMB / OpenBMB/XAgent

输入简单问题后网页响应缓慢并发生了XAgentTimeoutError

Open
#345 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
8.5k
Forks
905
PR merge metrics
No merged PRs in 30d

Description

使用 WebUI 测试,就输入了一个简单的问题:“你可以做什么啊?”

image

生成执行计划就用了好几分钟,后面具体执行直接超时了。

Log 里面我只看到一直在输出:

elated_mayer         | INFO:     127.0.0.1:49084 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49088 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49104 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49106 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49122 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49124 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49128 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:49140 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48300 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48302 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48312 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48324 - "GET / HTTP/1.1" 200 OK

最后超时:

elated_mayer         | INFO:     127.0.0.1:48312 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48324 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48326 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48340 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48352 - "GET / HTTP/1.1" 200 OK
elated_mayer         | INFO:     127.0.0.1:48358 - "GET / HTTP/1.1" 200 OK
ToolServerManager-1  | [2023-12-15 14:16:50 +0000] [8] [INFO] Request to node: http://172.20.0.8:31942/download_workspace
elated_mayer         | INFO:     172.20.0.6:54666 - "POST /download_workspace HTTP/1.1" 200 OK
ToolServerManager-1  | [2023-12-15 14:16:50 +0000] [8] [INFO] Response from node: 200
elated_mayer         | INFO:     Shutting down
elated_mayer         | INFO:     Waiting for application shutdown.
elated_mayer         | INFO:     Application shutdown complete.
elated_mayer         | INFO:     Finished server process [1]
ToolServerManager-1  | [2023-12-15 14:16:51 +0000] [8] [INFO] Node stopped: 8afa65b73e5fbae45d7784bad35337fa1746f983f2a86da2aac194cc3cf95015
XAgent-Server        | Traceback (most recent call last):
XAgent-Server        |   File "/app/XAgentServer/server.py", line 104, in interact
XAgent-Server        |     task_handler.outer_loop()
XAgent-Server        |   File "/app/XAgent/workflow/task_handler.py", line 115, in outer_loop
XAgent-Server        |     receive_data = self.interaction.receive(
XAgent-Server        |   File "/app/XAgentServer/interaction.py", line 212, in receive
XAgent-Server        |     raise XAgentTimeoutError("等待数据超时,关闭连接")
XAgent-Server        | XAgentServer.exts.exception_ext.XAgentTimeoutError: 等待数据超时,关闭连接
XAgent-Server        |
XAgent-Server        | The above exception was the direct cause of the following exception:
XAgent-Server        |
XAgent-Server        | Traceback (most recent call last):
XAgent-Server        |   File "/app/XAgentServer/application/websockets/base.py", line 324, in task_handler
XAgent-Server        |     server.interact(interaction=interaction)
XAgent-Server        |   File "/app/XAgentServer/server.py", line 106, in interact
XAgent-Server        |     raise XAgentRunningError(str(e)) from e
XAgent-Server        | XAgentServer.exts.exception_ext.XAgentRunningError: 等待数据超时,关闭连接

XAgent 是在本地跑了个模型么?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the WebUI request described in the issue, then start by tracing the timeout through XAgentServer/interaction.py:212, XAgent/workflow/task_handler.py:115, and XAgentServer/server.py:104-106. Compare the websocket task flow with the shutdown and /download_workspace logs; done means the simple request no longer waits until XAgentTimeoutError, with the behavior verified from the relevant logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.