
bug: scores page erroring out
快速结论:使用 Langfuse(Langfuse 工具) 的 LLM-as-a-Judge 评估功能时,在结果配置完成后,查看生成的分数时触发内部报错。优先排查后端容器(langfuse-web) 的 tRPC 路由 `scores.all` 错误日志,这可能与 ClickHouse 延迟物化配置(lazy materialization)有关。
问题场景
用户通过 Langfuse 配置了 LLM-as-a-Judge 评估机制,在评估运行完成后,试图访问 “Scores” 页面查看生成的分数时,页面直接报错,无法正常显示评估结果。
报错原文
tRPC route failed on scores.all: Internal error. Please check error logs in your self-hosted deployment. Internal error. Please check error logs in your self-hosted deployment.
TRPCError: Internal error. Please check error logs in your self-hosted deployment.
at /app/web/.next/server/chunks/[root-of-the-server]__11rqxm1._.js:1:4450
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
...
(前台前端日志):
{code: -32603, data: {code: "INTERNAL_SERVER_ERROR", httpStatus: 500, path: "scores.all", zodError: null, errorName: null,…}, message: "Internal error. Please check error logs in your self-hosted deployment."}
原因分析
此问题可能是由于 ClickHouse 的延迟物化(lazy materialization) 功能在执行高并发或复杂查询时导致超时或内部错误,进而引起 tRPC 路由 `scores.all` 处理失败。该配置在 Langfuse 自托管(self-hosting) 环境中比较常见,直接影响 scores 页面加载。此 Issue 被标记为可能重复 #14431 和 #13809。
环境排查
- Langfuse 版本(此次确认在 3.195.0 版本出现问题)
- 部署方式:自托管(self-hosting)
- ClickHouse 是否启用了默认的延迟物化(lazy materialization)
- 检查 Langfuse 的 Web 后端(langfuse-web) 和 Worker 容器日志
解决步骤
- 确认 `CLICKHOUSE_DISABLE_LAZY_MATERIALIZATION` 环境变量的值。可优先尝试将其设置为
true(示例命令:export CLICKHOUSE_DISABLE_LAZY_MATERIALIZATION=true)。 - 如果使用 Kubernetes 部署,修改对应 Deployment(如 langfuse-web)的环境变量配置。
- 重启相关 Pod 或服务使环境变量生效。
- 如果问题仍然存在,请检查 `scores.all` 接口相关的 TRPC 日志,确认是否存在其他 SQL 层面错误。
验证方法
重新尝试加载 “Scores” 页面,查看是否能正常显示评分数据和 LLM-as-a-Judge 结果。同时检查后端日志中是否再次出现 TRPCError 报错。
![[Bug]: Minimax m3 reasoning parser sending in content field in streaming](https://www.chat-gpts.plus/wp-content/uploads/2026/06/45687-72007dad-768x403.jpg)
![[Bug]: RPC call to sample_tokens timed out. Qwen3.5-397B-A17B](https://www.chat-gpts.plus/wp-content/uploads/2026/06/35496-ef53c44d-768x403.jpg)
