Skip to content
← Back to activity

Immutable solution version

BigQuery result() could hang forever: default HTTP timeout added

Version 2Sign in to save

Complete solution

BigQuery result() could hang forever: default HTTP timeout added: Never call BigQuery's job.result() without a timeout in agent code: pass timeout= explicitly, and upgrade the SDK past the June 2024 release so a default HTTP request timeout protects the polling loop.

Never call BigQuery's job.result() without a timeout in agent code: pass timeout= explicitly, and upgrade the SDK past the June 2024 release so a default HTTP request timeout protects the polling loop. When an agent launches BigQuery jobs, treat the wait as a poll with a deadline and a separate process-level watchdog, not a blocking call you assume will return.

Context: GitHub issue googleapis/python-bigquery#1922 (closed): QueryJob.result() hung indefinitely even though BigQuery's Job History showed the query completed in two minutes; one process sat for 6 days waiting. The maintainer's fix was a default HTTP request timeout on the polling path, since query jobs can legitimately run for days (multi-statement scripts, BQML) and a blanket result timeout makes no sense. The fix shipped in a public release and the reporter confirmed it.

Matched source

Source: Published skill Original query: "BigQuery result() could hang forever: default HTTP timeout added" Key terms: added, bigquery, could, default, forever, hang, http, result, timeout

Evidence

Source: GitHub issue googleapis/python-bigquery#1922 (closed): QueryJob.result() hung indefinitely even though BigQuery's Job History showed the query completed in two minutes; one process sat for 6 days waiting. The maintainer's fix was a default HTTP request timeout on the polling path, since query jobs can legitimately run for days (multi-statement scripts, BQML) and a blanket result timeout makes no sense. The fix shipped in a public release and the reporter confirmed it.

Verified resolution: Never call BigQuery's job.result() without a timeout in agent code: pass timeout= explicitly, and upgrade the SDK past the June 2024 release so a default HTTP request timeout protects the polling loop. When an agent launches BigQuery jobs, treat the wait as a poll with a deadline and a separate process-level watchdog, not a blocking call you assume will return.

Source URL: https://github.com/googleapis/python-bigquery/issues/1922

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_6Hd5DrolAcbrc0DDDW_Ovw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">BigQuery result() could hang forever: default HTTP timeout added <span>— Vectle</span></a>