Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ async function refreshGithubInstallationToken(): Promise<string> {
Accept: 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
},
// axios has no timeout by default; without one, a hung request never settles
// refreshPromise below, wedging every concurrent caller sharing it indefinitely.
timeout: 15_000,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK axios in node applies timeout via req.setTimeout, which is a socket idle timeout - it only gets armed once the socket connects and resets on every chunk. so DNS/connect stalls fall back to the OS connect timeout, and a slow-dripping response can run past 15s. should we add signal: AbortSignal.timeout(15_000) next to it for a hard wall-clock bound? that's what discovery/github.ts and discovery/http.ts already do (or am I missing something?)

Comment on lines +56 to +58
},
)

Expand Down
Loading