Skip to content

fix: add explicit timeout to async aiohttp requests#179

Open
dpmworld wants to merge 1 commit into
fustom:mainfrom
dpmworld:fix/async-request-timeout
Open

fix: add explicit timeout to async aiohttp requests#179
dpmworld wants to merge 1 commit into
fustom:mainfrom
dpmworld:fix/async-request-timeout

Conversation

@dpmworld
Copy link
Copy Markdown

@dpmworld dpmworld commented May 6, 2026

The async request path created a new aiohttp.ClientSession() without specifying a timeout, which falls back to aiohttp's default of 5 minutes. The synchronous requests path uses a 30 second timeout, so a hung connection produced very different failure modes between the two code paths.

Pass an explicit ClientTimeout(total=30) to the session to align the async path with the sync path and to fail fast when the upstream service is unresponsive.

The async request path created a new `aiohttp.ClientSession()` without
specifying a timeout, which falls back to aiohttp's default of 5
minutes. The synchronous `requests` path uses a 30 second timeout, so
a hung connection produced very different failure modes between the
two code paths.

Pass an explicit `ClientTimeout(total=30)` to the session to align the
async path with the sync path and to fail fast when the upstream
service is unresponsive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant