Front Door is set up with 2 origins: a web app and a storage(static web site).
I want a static page to be displayed in case of any problem with web app.
Origin group's settings are as follows:
Now if I stop the web app, error page of web app is displayed (403) on the FD URL for about 2-3 minutes and only after that static page is displayed. If I start web app back, it takes about the same 2-3 minutes to switch back to web app.
I've tried to change Health probe intervals in the Origin group settings, Origin response timeout on Overview page of FD resource, but with no luck.
Any help is appreciated.
Related
Setup
I have an Origin Group with 2 web sites: one is the "main" site and one is a "static" site. Front Door caching is disabled. There are no other devices / proxies / caches between Front Door and the web sites.
The origin group is configured as:
Health probe: 10 seconds
Session affinity: not enabled
All other settings as default
The origins are configured as follows:
main: Priority = 1, Weight = 1000
static: Priority = 2, Weight = 1000
NOTE: All testing using an incognito session and using ctrl-shift-r to force a reload in both Edge and Chrome. I have used this site as the refrence for what should happen: https://learn.microsoft.com/en-us/azure/frontdoor/routing-methods#priority
When I load the web site, it correctly goes to "main".
Failover Behavour
When I stop the "main" App Service, I would expect it to "think" for 10 seconds and then load the static site. But it does not. Instead, it does this:
0 to 30 seconds: "The web site is unavailable" (white background black text)
30 seconds to 120 seconds (in another test, it was much longer - it does not seem to be consistent): "Error 403 - This web app is stopped." (or just 403 if I'm oit using friendly errors. Develper Mode shows that I am receiving a 403 which is the main point, not a 200.)
120 seconds onwards: The static page shows
Failback Behaviour
When I restart the "main" App Service, I would expect it to "think" for 10 seconds and then load the main site. But it does not. Instead, it does this:
0 to at least 10 minutes onwards: The static page shows
Conclusions
Azure Door does not failover as per the probe settings. (So, either the probe does not work, or it does but is ignored by Front Door.)
Failback is not supported in Front Door.
How do I:
Get Front Door failover to work faster than 2 minutes after a failure?
Get Front Door to fail-back after the main site is up and running? (Purging the AFD cache does ot fix it. The only way I have found is to delete [not just disable] the "static" origin.)
If regions are deploying origins in two or more locations across the globe, you can improve the responsiveness of your applications by routing traffic to the destination that is "closest" to your end users. Based on my experience, here are my recommendations.
Enable session affinity
Deploy applications from various origins to improve portal performance with Load Balancers [Front Door, Traffic Manager, Load Balancer, Application Gateway].
Disable unused endpoints.
Replicating the same scenario with two apps and the above rules, both applications are loading fine without any issues.
step2:
I disabled EndPoint 1 and tested the FD portal.
Static application is running fine
The same step is repeated by the disabled App Services application.
WebApp Running fine.
I hosted a Web Api to azure app service. Everything works fine when I published it.
After a couple of days, the Web Api stops responding. But my app service is still running.
Even added application Insight Logs to all the code, to all the catch blocks, even then its not helpful.No exception was logged to date.
Checked the following, but doesn't seem to be helpful.
Thread Count of app service.
CPU time.
and this was the error when I tried to hit from postman after my web API is down.
<html><head><title>500 - The request timed out.</title></head><body> <font color ="#aa0000"><h2>500 - The request timed out.</h2></font> The web server failed to respond within the specified time.</body></html>
When I restarted my app service the web API started working and stops again after a couple of days.
I think your app service is being idled out due to inactivity . Please set always on to be true in the general settings in configuration blade , you can check out link
App service configuration.
I have ASP.NET Core Web API deployed as App Service on Azure. App Service is set up to require Client Certificate. Also AlwaysOn for App Service is set to True.
Issue is that first request with small payload sent to Web API takes approximately 2-3 seconds, and with large payload timed out. But after first small successful request, next one with large payload executes in less than a second. After some period of inactivity the issue occurs again, and first request to Web API again either takes time or timed out.
When Require Incoming Certificate is disabled, no issues with first request execution time, it executes quite fast always.
Web apps are unloaded if they are idle for a set period of time.
Quoted from official docs:
The downside is that the response to the first request after the web app is unloaded is longer, to allow the web app to load and start serving responses.
If you're using a Basic and Standard service plan, you can turn on the Always On setting to keep the app always loaded:
In the Azure portal, go to your web app.
Select Application settings.
For Always On, select On.
We have sitecore CMS (asp.net application) hosted in Azure Web Apps. On web.config the excutiontime has been set to 1 hour and the session and form auth is set to expire in 20minutes.
When I try to install the sitecore update package I keep getting error below within 4 minutes.
<html><head><title>500 - The request timed out.</title></head><body> <font color ="#aa0000"> <h2>500 - The request timed out.</h2></font> The web server failed to respond within the specified time.</body></html>
Appreciate if you could help me understand if there any explicit timeout setting on web app that that overwrite my web.config settings? If yes, how do we increase?
I had a look at few thread posts but didn't help:
Azure Web App or App Service: Service calls(web server) times out after nearly 4mins
How To Prevent HttpWebRequest with long response from timing-out Azure Web App
Thanks.
I have a Web site deployed on Azure Web App. My web site gets very slow at times. This behavior is random.
On checking IIS Logs during the period of slowness, I found few requests coming in where the Client IP Address is blank (It shows "-").
The response time of these requests runs into minutes and finally they result into HTTP 500 error. This happens only for the requests where c-ip is blank.
All other requests that have a Client-IP address are processed successfully. But because of the bad requests my application becomes very slow. I have to restart my Web App to resolve this issue.
What could be the possible reason behind these requests having a blank Client IP Address ? Could this be a malicious attack on the web site ?
Difficult to say. Could you add Application Insights service to your project? It allows you to see what is going on before and after 5 minutes of "this" request. The second reason can be the mode of your Azure Web App - is it free or shared or standard?
After AI added, you could share some more insights, because it is important to know what is that request about, not just the fact that it was processed.
https://azure.microsoft.com/en-us/documentation/articles/app-insights-start-monitoring-app-health-usage/