Troubleshooting

Overview

Sitefinity Cloud provides easy access to the tools and resources needed to troubleshoot problems with your project. The key components that are available to allow efficient troubleshooting process are the logs, database backup, and code files. 

The code of your Sitefinity Web Application is stored in a code repository in the Management Portal of Sitefinity Cloud. This provides an interface for  developers to see what code is currently deployed and download it locally to troubleshoot any issues or implement new functionality. For more information see Setup the project for development.

Your project database is backed up on regular intervals, and you can also create on-demand backups. You can use these backups to restore a local copy of the project database. For more information see Backup and restore the project database.

Logs

Sitefinity Cloud provides comprehensive logging to assist website administrators and developers in  troubleshoot any issues, as well as monitoring the health of the application. By default, Sitefinity Cloud exposes the following logs: 

  • Build logs
    They indicate the state of the application during a build process.
    You can view these logs by clicking any build in your Sitefinity Cloud project's Pipelines » Builds section. 
  • Deployment logs
    They provide detailed information about the deployment process. 
    You can view these logs by clicking any release in your Sitefinity Cloud project's Pipelines » Releases section. After you have clicked a release, hover over the environment that you want to review and click Logs.
  • Sitefinity logs
    These are all Sitefinity logs, such as Error.log and Trace.log.
    You can access and downloaded from the Management Portal of your Sitefinity Cloud project. 

Access Sitefinity CMS logs

You can access your Sitefinity website logs from the Management Portal dashboard.

In the Environments section, click the View logs link of the environment that you want to review.

You are redirected to the Logs section of the Azure portal where you can view the Application Insights. By integrating with the Application Insights, Sitefinity Cloud provides powerful mechanism to help developers and website administrators diagnose issues and understand the website usage patterns. This way, you can continuously improve your project performance and usability.

In the Application Insights section, you can view a summary of predefined metrics, such as availability of the website, server response time, and failed requests. You can customize the reporting period or the metrics that are presented.

View the logs

To open your Sitefinity Cloud project logs and drill down in the application health data, perform the following:

  1. Open the Management Portal Summary dashboard.
  2. In the Environments section, click the View Logs link of the desired environment.
    The Logs page opens. In the left navigation, the page displays a collection of predefined logs for your application such as:
    • traces
      This log aggregates the information from all system logs, except for the IIS Event Log and all Sitefinity CMS traces. In this log you can find tracing information about the application performance and any handled exceptions.
    • exceptions
      This log aggregates the IIS Event Log and Sitefinity CMS logs. In this log you can find IIS error, warning, and information events data, as well as any unhandled exceptions, usually logged in the on-premise versions of Sitefinity CMS log files.
  3. To view the entries inside any log, hover over the log and click Preview data.
  4. In the Query explorer, you can see different log entries by clicking a query entry and running it.
    There are predefined query sets - Sitefinity logs filtered by log type. Using these queries, you can access Sitefinity CMS logs by log type - ErrorLog, Trace, Authentication, etc.

Customize logs

You can extend the default logs by using the Progress.Sitefinity.AppInsights NuGet package. It provides integration for storing Sitefinity CMS logs in Application Insights. The integration extends the Application Insights telemetry by SitefinityLogType field, where the Sitefinity CMS ConfigurationPolicy values are stored - ErrorLog, Trace, Authentication, etc. This way, the user can filter the logs by the known types, which are used for the log files when on-premis Sitefinity CMS is used.

Query the logs information

By default, when you view a log you are presented with the latest 50 entries in it. Since the Sitefinity Cloud logs are based on Azure Monitor Log Analytics, you can build complex queries with the information contained in each log. This way developers and website administrators can easily find the information relevant to them, as well as implement custom logic for observing the entries they are interested in.
For more information on the query syntax and advanced capabilities, see Get started with Azure Monitor Log Analytics.

Diagnose performance

By default, your Sitefinity Cloud project has a performance profiler enabled in auto mode. This means that the profiler automatically collects data in the background on certain intervals without imposing an extra overhead on your application performance. 

You can view, drill down, and analyze the collected profiler data by going to the Performance tab of your Sitefinity Cloud project Application Insights in the Microsoft Azure portal:

Performance

The profiler is based on the Microsoft Azure App Insights profiler, and automatically collects data about your application components such as server-side operations, client-side operations, page views, and so on.

Profile performance on demand

By default the performance profiler collects data on certain intervals as determined by the Azure default logic. If you wan to profile your application on-demand, you can manually enable the performance profiler and monitor the results while browsing the parts of your application, whose performance you want to measure. To enable the performance profiler follow these steps:

  1. From your Sitefinity Cloud Management Portal Dashboard, click the Logs link for the desired environment
  2. Once the App Insights page for your project opens, click on Performance in the left-hand navigation
  3. From the top navigation click on Configure profiler
    EnableProfiler
  4. On the next screen click on the Profile now button

As a result the profiler is enabled an you can monitor the ongoing sessions as you browse your Sitefinity Cloud project. The profiler will run for a few minutes until it collects sufficient data.

Deployment package

Sitefinity Cloud is configured in continuous delivery and integration setup, in accordance to Sitefinity website development best practices and the Microsoft Azure services that are being used. 

On each commit in the master branch, the Continuous integration (CI) pipeline produces a deployment that is automatically deployed by the Continuous delivery (CD) release pipeline on the Staging environment.

Often the users do not include all the needed files in their VS project and the build process do not copy these files in the deployment package. You can verify whether the required files are included in the deployment package by performing the following:

  1. In the Management Portal navigate to Pipelines » Releases.
  2. Ensure your CD pipeline is selected.
  3. Click the desired deployed release.
  4. In the Artifacts section, click the build number of the WebsitePackageSource artifact.
    The CI build opens.
  5. In the Related section, click the published link.
    The Artifacts page opens.
  6. Expand the folder and download the SitefinityWebApp.zip package.
    This is the package that will be deployed on all the environments by the deployment process. The only difference is in the configurations, which will be transformed during deployment.
    For more information, see Use different website configurations for different environments.
  7. Ensure that all required files are included in the deployment package.

NOTE: Besides checking the files in the package, sometimes it is useful to set up this deployment package locally and troubleshoot any functionality, which is not working after deployment.
For more information, see Setting up the project code locally.

Additional troubleshooting resources

Sitefinity Cloud is integrated with Azure App Insights, thus delivering all available troubleshooting tools and mechanisms. For more information see What is Application Insights.

For example, you can use the Live Metrics Stream to monitor real-time data about your website incoming and outgoing requests,  as well as CPU utilization, memory consumption and exception rate. For more information about using Live Metrics Stream see Live Metrics Stream: Monitor & Diagnose with 1-second latency.

Was this article helpful?

Next article

Monitoring