Skip to content

[Bug]:设置页提示"无法从后端加载设置"和容器重启产生僵尸 turn,running 状态永久卡死(DOCKER部署) #504

Description

@azhongzz

Do you need to file an issue?

  • I have searched the existing issues and this bug is not already filed.
  • I believe this is a legitimate bug, not just a question or feature request.

Describe the bug

  1. 容器启动后 Web UI 白屏,控制台报错:
    NEXT_PUBLIC_API_BASE placeholder was not substituted
    同时设置页提示"无法从后端加载设置"。
    使用opencode检查后,提示
  1. 容器重启后(docker compose restart / 升级版本),重新进入之前正在进行的会话,Web UI 显示持续的"回答中"状态,且模型状态指示器在 模型加载中 和具体模型名之间来回闪烁。API 层面看,会话在持续被后台"占用"。
    具体故障链路:
  • 容器重启 → 所有 in-memory turn states 丢失
  • 数据库里 turn 的记录状态仍为 running(没有 crash recovery 逻辑)
  • 前端 WebSocket 重连 → 发 chat:resume → 后端查 DB 发现 turn status=running → 前端进入"等待回答"
  • 部分实现中,前端有一个 10 秒 GET 轮询来 check turn 状态,轮询到 status=running 就继续等
  • 模型状态指示器在 模型加载中 和模型名之前切换,说明前端在 connecting 和 connected 状态间震荡

参考opencode,提交这两个bug,看看是否有帮助

Steps to reproduce

bug2的复现步骤

  1. 启动 DeepTutor 容器
  2. 在聊天中发送一条消息,等待 LLM 开始回答但尚未结束时(turn running)
  3. docker compose restart 重启容器
  4. 刷新 Web UI 或重新打开该会话
  5. 预期: 回到会话,显示已完成的最后一条消息
  6. 实际: UI 显示"回答中",模型状态上下跳动,约 5 秒后恢复(但感知的等待时间很长)

Expected Behavior

No response

Related Module

Other

Configuration Used

版本是 1.4.0-beta
LLM是 DS FLASH

Logs and screenshots

No response

Additional Information

  • DeepTutor Version: 1.4.0-beta
  • Operating System: WIN 11
  • Docker: 4.74.0
  • Browser (if applicable): 火狐150.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions