Below are common Azure App Service issues.
‘StackifyHttpTracer’ Not Found
If you encounter the error “Could not load file or assembly ‘StackifyHttpTracer’ or one of its dependencies. The system cannot find the file specified.”, download and install our NuGet package that will install the module into your project:
Using the “WEBSITE_LOCAL_CACHE_OPTION” Azure Setting
We can’t support APM with this setting enabled.
With this setting enabled, you are likely to get a couple minutes of data and then APM will abruptly stop. A little back-story: because we collect the data out-of-process via the web job, we have to output to D:Home as D:local is per process so D:local for w3wp.exe can’t be accessed by any other running process. Microsoft docs state that “D:Home will point to the local cache.”Unfortunately, we cannot, via Kudu, access the local cache drive which is on C:. The advice is to not use this setting.
Agent Goes Down After Deployment/Web Deployment Task Failed Error
If you are using multiple deployment slots, you will want to install the site extension for each deployment slot. This is required so when you are swapping slots everything works correctly, as site extensions are part of what is swapped. Setting Stackify.Environment is also important so we can identify which slot is which.
If you are trying to deploy your application and getting an error about StackifyWebJob files being locked, you may need modify your deployment settings. Stackify runs as a WebJob that is installed via the Azure Site Extension in to your App_Data folder. If you are trying to use the optional deployment setting of “Remove additional files at destination” this would try to remove our WebJob.
Error: Web deployment task failed. (Web Deploy cannot modify the file ‘StackifyWebJob’ on the destination because it is locked by an external process.
To fix this, also select “Exclude files from the App_Data folder” so the Stackify WebJob is not affected by the deployment. This setting is shown below in the Visual Studio UI as part of the publish options.
No APM data for .Net Core Applications
In Azure, the platform architecture option can be configured as 32 or 64 bit. The application service ‘bitness’ needs to match the publish/compile bitness set here. If this doesn’t align, Stackify may have issues profiling the application.
Following changes to your app, sometimes it is necessary to remove the site extension and reinstall as such:
1. Delete site extension and related folders
2. Reinstall site extension
3. Restart site
Restart is Different than Stop and Start
It is important to note that fully stopping and then subsequently starting an Web App, Webjob, or Web Service inside of Azure can function differently then a normal ‘Restart.’ All these actions are in the control panel of the Azure Portal.
If APM data doesn’t show following a restart, a full stop/start has shown to work in some instances.