Cold Start Trick with new v4 module
See original GitHub issueI saw this interesting medium post based on aws-serverless-express
that helps with cold-start in nestjs by moving the bootstrap part to the init stage and not within the handler, like shown below
Need help with translating this to the new v4 way of bootstrapping the express server using nestjs as the proxy
is deprecated.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
Priming for a Cold Start - PilotWorkshops
Starting an airplane during cold conditions is often more of an art than procedure. Know your POH recommendations, pre-heat if possible, and don't...
Read more >Cold start of Azure Function with large npm module trees is ...
Hi--, I've notice that the initial call of an Azure function (i.e. a couple of minutes after the last call) takes a significant...
Read more >ATV Won't Start When Cold (This is why) - ATVFixed.com
Cold Starting an ATV; Fuel Injected Cold Start; Faulty Battery ... rely on the plug you have removed as a reference unless you...
Read more >What's the trick to cold starting? - Megasquirt Support Forum ...
The first factor is having the fuel dialed in correctly when it's warmed up. With the exception of cranking pulse width, all other...
Read more >4-STROKE STARTING TIPS - Dirt Bike Magazine
Quick tricks from the Javeline. Cold starting: Yamaha says to twist the throttle twice to prime the carb, but I pull in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope 😒
Hey @Muthuveerappanv, after trying a few different implementations, I’ve managed to get a working updated solution for my services:
This seems to be working fine for me at the moment. But occasionally I’ll see an initial DB connection error in the logs on startup, although it always immediately retries and succeeds.
To be honest the error seems to have little impact, when it occurs. I’m guessing this occasional startup error could be caused by the container network services simply not being ready in time. 🤷