hooksTimeout
⚠️ This is a V1 design only feature: make sure to 1. update Vike to the latest version and 2.
migrate to the V1 design.
If a hook returns a promise that takes too much time to resolve, then Vike logs an error and your error page is rendered.
You can configure the timeout of hooks:
Disable
You can disable timeouts:
⚠️ We strongly discourage this practice:
- You may always want to be informed when one of your hooks is slowing down your UI.
- Showing an error page is usually a better UX than displaying a UI that hangs indefinitely.
- If your server doesn't time out long running HTTP requests, then you have a memory leak.
Instead, consider increasing timeouts as the need arises.
You can also disable timeouts for all hooks: