#set idleTimeout when using bun preset

3 messages · Page 1 of 1 (latest)

cosmic aurora
#

how do i set the idleTimeout parameter used by the Bun.serve server underneath when using nitro preset bun

I cannot use other preset than bun, otherwise i get a weird error about ofetch missing as a package

and if I use bun, I'm building a software with analytical queries which are supposed to take a longtime, but they end up 502 Gateawaiting because of idleTimeout

so if anyone has any clues I'm interested

stone raptorBOT
#

Hi @cosmic aurora. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The provided knowledge sources don’t mention any way to configure idleTimeout (or other Bun.serve options) through Nitro’s bun preset, nor an escape hatch to pass custom options directly to Bun.serve.

Nitro / Nuxt docs and issues in the sources only touch Bun in terms of:

There is no documented nitro config key (in these sources) that maps to Bun’s idleTimeout, nor any Bun‑specific server options.

Given that, based only on the available information:

  • I’m not able to point to a supported way (in these docs) to change idleTimeout when using preset: 'bun'.
  • The sources also don’t document a recommended workaround for long‑running analytical requests on Bun (e.g. switching preset, custom entry, or configuration in Nitro).

If you need this today, the next step would be to raise this upstream in Nitro’s issue tracker, as Nuxt maintainers already direct runtime/server‑side behaviour questions there in similar cases. [Netlify rate limit issue]

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: