Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide config idle timeout for bun runtime. #2984

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

jamaluddinrumi
Copy link
Contributor

[Bun.serve]: request timed out after 10 seconds. Pass `idleTimeout` to configure.

we need to be able to configure idle timeout for bun runtime, because if there are any fetch inside event handler sometimes need more than 10 seconds.

we can leverage built in NITRO_SHUTDOWN_TIMEOUT environment variable to configure this.

references:

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

```
[Bun.serve]: request timed out after 10 seconds. Pass `idleTimeout` to configure.
```

we need to be able to configure idle timeout for bun runtime, because if there are any [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch) inside event handler sometimes need more than 10 seconds.

we can leverage built in `NITRO_SHUTDOWN_TIMEOUT ` environment variable to configure this.

references:
- https://bun.sh/docs/api/http#idletimeout
- https://nitro.build/deploy/runtimes/node#environment-variables
@jamaluddinrumi jamaluddinrumi requested a review from pi0 as a code owner January 8, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant