Asked By: Anonymous
I am deploying a next.js app to a Google App Engine (standard) but I am having trouble with cold start times.
I am building locally then deploying the
.next folder to GAE. On the first boot it takes 15-25 seconds to boot up. Looking at the logs I can see a log for a very long
GET 200 request but there’s not really any information about what is going on. See image below:
When I run
yarn start locally it boots up in < 1, which as far as I understand is running the same production build? It is almost as though GAE is doing a build before it eventually deploys..
Any pointers would be immensely appreciated!
Answered By: Anonymous
The key was to enable the
serverless in my next.js config.
Now it only takes 1 second to cold boot 🙂