Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
514 views
in Technique[技术] by (71.8m points)

asp.net - How to prevent an Azure website from going to sleep?

I deployed an ASP.NET 5, MVC 6 web application to Azure. It seems that if I don't hit the site for 10-15 minutes, it goes to sleep and it takes a good 10-15 seconds for it to wake up.

I am not sure whether its the website that's falling asleep, or the database that it's connecting to.

So 2 questions.

  1. How do I prevent the site from going to sleep so soon.
  2. Is there a way to have visibility into what's going on in Azure with the website and the database. Are they kicked out of memory?
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Azure Web Apps have an 'Always on' option (with basic/standard tiers) which keep your app (and associated web jobs) loaded.

Look under Settings, and you'll see 'Application settings':

Application settings

Then look for the 'Always on' setting (which will be disabled for Free tier):

Always on


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...