Notes

A retry that hid a three-minute wait

The first live question to this site’s AI assistant took 173 seconds. The log said one successful call that cost less than a cent, and nothing else.

The likely cause was a stalled connection that the SDK retried silently. I could not prove it, because nothing recorded the retry. A layer that retries for you also hides that the first attempt failed.

Two changes fixed it. The HTTP client now gives up if the API has not started answering within 30 seconds, so a stall is retried quickly instead of near the deadline. And every failed or retried attempt writes its own log line with its status and duration.

The rule I took from it: if something retries automatically, log each attempt, or you cannot explain the slowness later.

AIGo