Azure / Azure/static-web-apps

Instance is not woken up by Function Proxy (keeps returning 503)

Open
#940 10 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

[This setup](https://github.com/scale-tone/cognitive-search-static-web-apps-sample-ui#cognitive-search-static-web-apps-sample) now suffers from Web App instance going to (some sort of) sleep and then not being properly woken up.

Specifically, when you navigate to https://lively-sand-033e9ec03.azurestaticapps.net/ after a period of inactivity, the statics are being fetched from either browser cache or CDN (and therefore do not wake up the instance), while /api requests keep failing with 503 status for quite a while (minutes):

![image](https://user-images.githubusercontent.com/5447190/193832708-345d7a12-400e-4ea5-818b-f77b1b98d96c.png)

The specifics of /api endpoint in that app is that it doesn't have any Functions, [only Proxies](https://github.com/scale-tone/cognitive-search-static-web-apps-sample-ui/blob/master/api/proxies.json). I'm speculating here, but this might be the reason why the instance is not being properly woken up.

**To Reproduce**

Go to https://lively-sand-033e9ec03.azurestaticapps.net/ in the middle of the night and press F12. Observe the Network tab.

Code is here: https://github.com/scale-tone/cognitive-search-static-web-apps-sample-ui

**Expected behavior**
Requests to /api endpoint should never fail. If the instance is asleep, they should bring it back online and return success.

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.