I am running my asp.net C# app on azure appservices in a reasonably good plan and I am getting a really slow app initialization. This happens every time I deploy or restart the app.
At first, I thought my global.asax Application_Startup was taking too long to load configs from the database. But then I realized that it is taking over 20 mins before it even hits my Application_Startup.
I'm looking for ideas on where to look for the root cause of the problem.
Many thanks
I would suggest to check for Azure Metrics logs to get more details, also one of the best thing which I love to do is remote debugging on Azure app. You can check below post for more details on remote debugging:
Remote debugging Azure App Service
Related
I am trying to use the "FREE" layer of Azure App Services using the GitLab Container Registry.
To do the DEPLOY I am using WebHook, but I am not having success. I call WebHook to start Deploy (via Postman) and when analyzing the deployment LOGs, nothing happens.
The strangest thing is that at times it works, but it seems to be only once a day.
I call WebHook as follows:
https://$<my-app>:<token>#<my-app>.scm.azurewebsites.net/docker/hook
Are there any limitations for being a free tier?
#Junior, please note that with Web Apps free tier there are a few quotas.
The two that you might be hitting are:
You can only use the CPU 3 out of every 5 minutes
You can only use the CPU 60 minutes every 24 hours
Source:https://learn.microsoft.com/azure/azure-resource-manager/management/azure-subscription-service-limits#app-service-limits
Windows Web Apps have a quota blade that allow you to see if you are actively hitting a quota. I would suggest checking there. Also check the diagnose and solve blade for your app to verify one of the above quotas are being hit.
We are migrating to Azure. We have a Web App deployed. However, I have a Windows Service that I need to add in to the mix. The service continuously runs, checking the associated Service Bus Queue for messages every 5 seconds.
I am looking for recommendations on how to do this.
I have looked at Web Jobs. But, I don't understand how it gets kicked off. I know there is a Web Hook involved - but I just want the code to run continuously without having to be constantly kicked.
We are also trying to avoid the cost of having a VM involved.
Thanks in advance.
Since you already have a web app, you could use a Azure App Service to run the Web App. The Azure App Service will allow you to also have a Web Job that you can have run on a schedule.
It does not make sense to break you web app into Azure Functions since it is already built. You can have the service run in an Azure Function, but it will probably add more complexity to interact with the web app (if that is what is happening) and if the service is running every 5 seconds, that could get costly.
We have an App Service Plan in Azure (PremiumV2: 1 Medium) with 14 App Services setup, but they are all stopped.
So without any load (that I know of), our CPU sometimes spikes to 100%. Is this normal? How can I find out what is causing the spikes? I'm guessing it isn't one of the App Services, since they are all stopped.
Generally, we click stop botton in the panel of Azure portal to stop an app service, but it only stop the main site you deployed under wwwroot, not the SCM site where Kudu & WebJob runs.
There is an offical document of Kudu wiki Full stopping a Web App which may explain your current case. When you deployed some WebJobs running in your App Services, they will not be stoped by clicking the stop operation in Azure portal. And it seems to be some continous WebJob running which cause the CPU & Memory consuming.
If you want to stop all of them thoroughly, please follow the wiki above to know how to do. Hope it helps.
I have a console app that is made using Azure Webjob SDK. The app makes calls to 3rd party website and performs some logic (authentication, posting some data, etc).
The app works on local machine just fine, but when I deploy the exact same app on Azure as a WebJob then it's not working as expected. The 3rd party website logs the client out after some requests being made (randomly without any patterns as I see it). No exceptions detected in the app itself. This is very confusing since the code is the same and I'm wondering what's the difference between running on local machine vs running on Azure.
Usually I would use Fiddler to see what's going on with request/response during those website calls. How to do that on Azure? How can I see all the requests/responses made by that app? Are there any tools for it?
You could go for remote debuging, as suggested in the comments. It will let you step through the execution of your code.
You could also enable Application Insights in Azure, integrate it in your webjob, and start collecting logs and detailed diagnostics. This way you will get detailed information about the execution of your webjob.
I've just completed an automation script that:
downloads a project build to local storage (worker role)
installs ruby, apache, and other dependencies
configures apache and the RoR application to serve requests via port 81
This is all working locally. I'm working with visual studio; running the application successfully pulls the local machine from "blank slate" to "serving requests".
I'm now trying to push this up to Azure - no longer using the local machine, but an actual worker role.
I've packaged the project and uploaded it to a production environment via my Azure subscription portal, but navigating to the site URL doesn't give me anything (site not found).
I'm a bit new to Azure. What steps do I need to take to ensure that this application will work up in the cloud? I feel like I've forgotten to configure something, like the endpoint port (81). Any advice or recommended reading would be super helpful; thank you so much for your time!
If you need some real assistance to troubleshoot the problem, tt would be best to see the following 3 things:
Your automation script (Startup Task)
Your worker role OnStart() function
Your ServiceDefinition and ServieConfiguration
Are you using ProgramEntryPoint to luanch your RoR app or you are doing all of this in Startup task? Based on above info, it is easy to understand the application architecture and some suggestions can be made.
However, the best way to troubleshoot this problem is to enabled RDP access to your Azure Worker Role VM and then Log into your Azure VM to understand what is going on. RDP access to Azure VM will validate that your install script ran correctly and all the modules were started.
As your are new to Windows Azure there could be several things could be missing and if you provide more info you will get accurate help instead of some guess work.