Does anyone know how to set the keepAliveTimeout for nitro in Nuxt 3?
We're having some large issues with AWS's Application Load Balancer and Nuxt 3, it seems to stem from node's default of 5s keepAliveTimeout.
8 Replies
not sure, but this might be helpful: https://github.com/nuxt/nuxt/issues/18857#issuecomment-1617817115
GitHub
Nuxt3 set server.keepAliveTimeout · Issue #18857 · nuxt/nuxt
Describe the feature this issues to nuxt3 #9740 hooks: { listen(server) { server.keepAliveTimeout = 0 server.headersTimeout = 0 } }, This has no effect in nuxt3 How to set server.keepAliveTimeout A...
oh man, i do not like that solution.... https://github.com/nuxt/nuxt/issues/18857#issuecomment-1806826697
GitHub
Nuxt3 set server.keepAliveTimeout · Issue #18857 · nuxt/nuxt
Describe the feature this issues to nuxt3 #9740 hooks: { listen(server) { server.keepAliveTimeout = 0 server.headersTimeout = 0 } }, This has no effect in nuxt3 How to set server.keepAliveTimeout A...
yeah i saw those too, not great 😦
:\
@manniL / @danielroe / @Atinux any better way to set this?
Here's my terrible tweak that seems to work..
I beat up my server for 10 min and had zero errors from the load balancer .. but this solution is fragile, there should be a super easy way to do this natively that doesn't involve creating my own Nitro preset or something.
This should be raised in https://github.com/unjs/nitro, targeting the node preset I think
I think it could be resolved with a custom preset at the moment based on the node one 🤔
https://github.com/unjs/nitro/issues/2638
I really don't want to create my own node preset just to control 2 values for the server being spun up (and loose all the great stuff the preset already has)
You can extend the current one and simply add the two lines to the generated server, similar to what you do now but a bit more declarative
I personally think that an easier way to config would be better