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

Timeouts when using split/plugin architecture and server-timing plugin #1

Open
gitblit opened this issue Mar 25, 2024 · 4 comments
Open

Comments

@gitblit
Copy link

gitblit commented Mar 25, 2024

Background

When using a split architecture...

  • plugin with derive & onBeforeHandle
  • individual route that uses this plugin
  • app that uses the individual route

... combined with the server-timing plugin, you may/can experience timeouts in request processing.

Example

I have created a minimal reproduction repository to demonstrate the problem.
gitblit/elysia-server-timing-timeouts-repro

  1. Clone the repo
  2. bun run dev
  3. bun test

Then comment this line and repeat:
https://github.com/gitblit/elysia-server-timing-timeouts-repro/blob/main/src/index.ts#L48

@SaltyAom
Copy link
Member

SaltyAom commented Mar 29, 2024

Should be fixed in elysia: 1.0.10, reference: elysiajs/elysia@e074fd9.

@gitblit
Copy link
Author

gitblit commented Apr 6, 2024

That looks much better! Thanks!

@gitblit gitblit closed this as completed Apr 6, 2024
@gitblit
Copy link
Author

gitblit commented Apr 7, 2024

Actually, I was faked-out. It may be better ... but if onBeforeHandle sets status and returns a result it still waits for 5 second timeout.

@gitblit gitblit reopened this Apr 7, 2024
@gitblit
Copy link
Author

gitblit commented May 11, 2024

@SaltyAom should I report this to the main repo instead of the plugin?

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

No branches or pull requests

2 participants