nitro icon indicating copy to clipboard operation
nitro copied to clipboard

feat(node-server): add env variables for timeout setting in node-server runtimes

Open lastmirage opened this issue 2 years ago โ€ข 7 comments

๐Ÿ”— 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)
  • [x] โœจ 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

When deploy node runtime to behind AWS ELB, timeout missmatching can leads to 502 error. For resolve this error, we have to set timeout values in HttpServer.

๐Ÿ“ Checklist

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

lastmirage avatar Nov 22 '23 08:11 lastmirage

Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio โ†—๏ธŽ View Live Preview c989cd5b311b00b249f3d7b6063d08bc38768e6f

nuxt-studio[bot] avatar Nov 22 '23 08:11 nuxt-studio[bot]

Thanks for this PR. It makese sense to allow supporting more customizations for Node runtime server but adding more as direct env variables might be a tricky task to maintain.

I am pending PR to think little more what would be alternative.

pi0 avatar Nov 22 '23 09:11 pi0

Hi @pi0, do you have an idea for a better solution than the one provided by @lastmirage?

unite4 avatar Aug 21 '24 06:08 unite4

@pi0 any chance to have an update here? Thanks!

joaoaraujo-hotmart avatar Sep 10 '24 18:09 joaoaraujo-hotmart

Hey @pi0, first of all I want to thank you for your effort and time you put in to all of this, I know it is not easy, the web space became so complicated, we have now different runtimes, so many ways to deploy apps, so many infra variations, and I guess making sure all of this works is not an easy task, again thank you. I just want to ask you about this issue, do you guys plan to add something in the next major release that will allow us to configure this values, either how is proposed here or maybe in a different way?

vsergiu93 avatar Sep 20 '24 12:09 vsergiu93

I am thinking to finally land it for v2 at least (but need to cleanup changes little bit before merge).

(this is what working on for Nitro v3: spoiler - i hope to find a better standard away to set these regardless of runtime and also framework so it won't be nitro specific convention)

pi0 avatar Sep 20 '24 12:09 pi0

@pi0 Awesome, thanks.

vsergiu93 avatar Sep 20 '24 12:09 vsergiu93