So I managed to improved the load times by enabling "serverless" in the 
next.js settings. This is enabled by default when deploying to ziet. I also 
added the /_ah/start warmup which essentially just keeps the instance alive.

All getInitialProps are just returning some basic context and I'm using GAE 
standard with the default server size.

Still a bit baffled but it seems to be working ok now.


On Monday, April 20, 2020 at 9:38:06 PM UTC+1, Blaine Garrett wrote:
>
> That seems a bit odd.  I have a next.js app on Standard and goes from cold 
> start to content paint  in approx 5 seconds with data fetching on the 
> server.
>
>
> What instance type and size are you using?
> Does your getInitialProps make any REST calls, access a database, etc? If 
> so, are those cold starting as well?
> If you are using scaling that leverages /_ah/start handler, is it 
> accidentally doing REST Calls, etc etc?
> Do you use a custom server that might be doing something odd?
>
>
>
>
>
>
> On Monday, April 20, 2020 at 7:25:37 AM UTC-5, Alex Fox wrote:
>>
>>
>> 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:
>>
>>
>> [image: Screenshot 2020-04-18 at 17.13.29.png]
>>
>>
>>
>> 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!
>>
>>
>> Alex
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/88e53613-13ae-4ddd-9d84-28ef6c8096c6%40googlegroups.com.
  • [google-appengin... 'Alex Fox' via Google App Engine
    • [google-app... Blaine Garrett
      • [google... 'Alex Fox' via Google App Engine
        • [go... 'Katayoon (Cloud Platform Support)' via Google App Engine
          • ... 'Alex Fox' via Google App Engine
            • ... Blaine Garrett
            • ... 'Katayoon (Cloud Platform Support)' via Google App Engine

Reply via email to