Repository navigation
fix(http): stop long queries from failing after 6 minutes - #169
Merged
Merged
Conversation
…eries Bun's fetch aborts a response that stays silent for 300s (360s in practice on Bun 1.4.3), independently of the request's AbortSignal. A long-running /query sends its headers and then nothing until the statement finishes, so any query over ~6 minutes failed with "Request failed (network error): POST .../query (The operation timed out.)", whatever --connect-timeout and --read-timeout said, while the statement kept running server-side. Pass timeout: false to Bun's fetch and disable undici's headersTimeout and bodyTimeout, so the CLI's own connect and read timeouts are the only limits and --read-timeout 0 is unlimited for streams, as documented. Co-authored-by: Cursor <cursoragent@cursor.com>
leo-altertable
approved these changes
Oct 22, 2026
utay
enabled auto-merge (squash)
October 22, 2026 14:09
utay
pushed a commit
that referenced
this pull request
Oct 22, 2026
🤖 I have created a release *beep* *boop* --- ## [1.13.2](v1.13.1...v1.13.2) (2026-10-22) ### Bug Fixes * **http:** stop long queries from failing after 6 minutes ([#169](#169)) ([b69e6aa](b69e6aa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Disable the runtime's built-in fetch idle timeout (
timeout: falsefor Bun,headersTimeout/bodyTimeout: 0for undici). The CLI's own--connect-timeoutand--read-timeoutare now the only limits.Why
Bun's
fetchaborts a response that sends no bytes for 300s (360s in practice on Bun 1.4.3), regardless of the request'sAbortSignal. A long/querysends its headers, then nothing until the statement finishes, so every query running longer than 6 minutes failed withRequest failed (network error): POST …/query (The operation timed out.), whatever the timeout flags said. The statement kept running server-side. A customer hit this on longCREATE TABLE … ASloads.Verification
timeout: false.buildFetchInitdisables the native timeout, with and without--ignore-ssl-errors.bun run check --quickpasses.Checklist
CHANGELOG.mdupdatedMade with Cursor