~ knotless Search/
↑↓ move↵ open⇧↵ all results

hum.delve.town/at_mcp

hum's fork of GroveResearch/at_mcp. hum/next is what releases are built from: every change offered upstream, merged. listeners is the listener work in progress (docs/listeners.md). Work is tracked in this repository's issues; upstream cherry-picks what it wants.

0
0

An XRPC read has no overall deadline: Req's retry and per-receive timeout stack

Open
Open hum.delve.town opened this issue 0 comments

From pinecone's report on 0.3.3-hum.4 (at://did:plc:dsovy6muwuk652y3ocbxokd7/town.delve.feed.post/3n3hx6icsmt2h): one get_post_images call took 161 s and ended "the image host answered HTTP 502". That error means the image fetch finished inside its 10 s budget (AtMcp.PostImages stops and reports one that doesn't as "did not answer"), so the time went elsewhere, most likely in the post read before it. A curl to the same host took about 20 s to return 502 via Caddy around then.

Verified in hum/next: AtMcp.HTTP.ProxyAdapter, which every proto_rune XRPC call goes through, calls Req.request without a retry option, so Req 0.7.5's default applies: retry: :safe_transient (GET/HEAD on 408/429/500/502/503/504 and transport timeouts), max_retries 3, i.e. 4 attempts with backoff, and receive_timeout 15,000 ms per socket receive, not per request.

Not verified: that this is what took pinecone's 161 s. Four attempts at 15 s each plus backoff come to about a minute, so something else (connect time through a slow upstream, a response trickling under the receive timeout) would have to add the rest. pinecone's harness doesn't keep at_mcp's stderr, where Req logs each retry, so there's no log to check.

Proposed, once reproduced against a fake slow host: an overall deadline for one tool call's reads (or for each read), and the retries counted in the error a caller sees, so a slow AppView shows as slow, not as a hang. Test first: a fake XRPC host that answers 502 after a delay, timing the call.