how to set a timeout for long running queries?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
Hi,
i am having trouble finding a way to keep fetch running when i have to deal with long running queries.
i am talking about a minute max time. the query works fine in the browser, and returns 200.
undici seems to be waiting exactly 30s till it fails.
this is how my request init looks like: {"method":"GET","headers":{},"keepalive":true,"keepAliveInitialDelay":120000, "socketTimeout":0}
i am using undici 5.18.0. installed via npm.
Any idea how to solve that?
Cheers and Thanks!!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the 30-second failure with the shown request options in undici 5.18.0, then inspect the timeout-related configuration. Done means identifying the supported setting for a roughly one-minute query or documenting that the reported options do not control it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100