I have three static web app services on Azure, each hosting a Svelte application. I am facing the same problem across all of these services. After a 10-15 minute pause in using the application, the first request takes between 6 and 12 seconds on average to complete. This delay only happens with the first request, and subsequent requests work well without any delays.
Application Insights shows operations for sk_render.
I am using the standard hosting plan for all services, and I also activated enterprise-grade edge for one application, but this did not change the situation.
2
Answers
This "wake-up" process can cause a delay in response time.
I solved the problem by creating an Azure Logic App (as proposed by @phantom) that calls every 1 minute an endpoint.
Every 3 minutes (default value for Recurrence) is not enough! Even then my app was hibernated from every 5 tot 15 minutes, but with 1 minute it seems to work!