AIStudio2API icon indicating copy to clipboard operation
AIStudio2API copied to clipboard

似乎常会发生70.14秒 context canceled

Open TatsuyaGit opened this issue 3 weeks ago • 2 comments

使用的是deepseek-harness ,经常纪录 499 context canceled 多次都在70.14秒

Image

DSH报错是upstream stream ended before a completion event; this turn may be incomplete

Image

TatsuyaGit avatar Nov 05 '26 08:11 TatsuyaGit

服务在流式等待时每10秒发一次心跳,所以连接不会空闲超过10秒;这像是客户端或中间代理的固定超时,但我也不知道。举例,如果nginx缓冲,客户端会在很长时间内看不到内容,大约60~70秒后超时,这个可以解释,同时大概率并不是修改我们服务代码可以解决的。 以及,图二这个报错的文本我在dsh、pi-ai仓库里都没搜到,这很奇怪 待我再去排查一下

Mag1cFall avatar Nov 05 '26 08:11 Mag1cFall

SSE被缓冲这个点实际上的确可以在服务内修复,以及流式响应的心跳问题,可以在v0.3.1试一下还会不会出现这个报错

Mag1cFall avatar Nov 05 '26 18:11 Mag1cFall