Skip to content

知识库上传图片后分块失败:VLM 请求 timeout(syncHttpClient 30s 过短) #107

Description

@zls200299

问题描述

在知识库上传图片后,分块阶段失败,报错:
com.nageoffer.ai.ragent.infra.http.ModelClientException: VLM 请求失败: timeout

复现步骤

  1. 管理后台 → 知识库,上传一张图片(PNG/JPG 等)
  2. 等待分块任务执行
  3. 分块失败,日志出现上述 timeout

预期行为

图片应能正常完成分块(VLM 图生文后写入向量)。

实际行为

分块调用视觉模型时超时失败。

原因分析

  • 分块链路:KnowledgeDocumentChunkConsumerImageDocumentParserRoutingVlmService.describeImage
  • VLM 复用全局 syncHttpClientHttpClientConfig
  • 当前读超时 30s、整次调用 45s
  • 用同一视觉接口实测约 39s 才返回 200,超过默认读超时

建议

  • 为 VLM 单独设置更长超时(如 read 120s / call 150s)
  • 或增加可配置项(如 ai.vlm.timeout-ms

环境

  • 视觉模型:qwen-vl-max(bailian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions