You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm using Bun + Hono to build a chatbot (with streams).
Sometimes it fails with [Bun.serve]: request timed out after 10 seconds. Pass idleTimeout to configure. because my request is sadly too long.
I've tried to extend timeout delay and dunno how to make it effective.
Actually, I wrote this in my app.ts :
import type { Serve } from 'bun'
import { Hono } from 'hono'
....
export default {
idleTimeout: 90, // seconds
fetch: app.fetch
} satisfies Serve
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm using
Bun
+Hono
to build a chatbot (with streams).Sometimes it fails with
[Bun.serve]: request timed out after 10 seconds. Pass idleTimeout to configure.
because my request is sadly too long.I've tried to extend timeout delay and dunno how to make it effective.
Actually, I wrote this in my
app.ts
:Source: https://bun.sh/docs/api/http#idletimeout
It seems to work, but I don't know if it's the official/cleanest way (there is an official middleware but it warns for Stream : https://hono.dev/docs/middleware/builtin/timeout#notes)...
Any advice?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions