Azure / Azure/static-web-apps

Nextjs ssr experiencing cold start ( > 5 sec)

Open
#1,545 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

As mentioned in a previous issue reported about that here : https://github.com/Azure/static-web-apps/issues/1144#issue-1680050457

This issue is still present. I'm deploying a Next.js app with server-side rendering (SSR), and the initial call takes over 5 seconds for a simple app. Subsequent requests load much faster. However, if the app is idle for some time, it triggers another slow response, which seems like a cold start. Could this be due to the SSR server experiencing cold starts? If so, is there a way to configure it to always stay on or keep it warm to prevent this delay?

Screenshot 2024-09-16 at 10 43 56 AM

**To Reproduce**
Steps to reproduce the behavior:
Create NextJs app with ssr.

**Expected behavior**
The app should load faster on the inital call to getServerSideProps

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.