---
title: Maintain what you have built
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

## Maintaining

Analyze the data you gather from your project to determine what actions to take. Focus on optimizations of content and performance.

### Environment maintenance

- Define a backup strategy (e.g., database file system backups and a disaster recovery / restore plan).
- Perform SQL maintenance (e.g., shrink the transaction log, rebuild indexes).
- Plan outages and take necessary steps to notify the appropriate people.

### Application maintenance

- Review and address performance issues [using tools like MiniProfiler](https://dev.to/michael419/get-to-know-xperience-by-kentico-unlocking-performance-insights-with-miniprofiler-2b2c).
- Keep software patched and up-to-date, [including Xperience](https://docs.kentico.com/documentation/developers-and-admins/installation/update-xperience-by-kentico-projects.md), the operating system, SQL server, etc.
  - If you [prepare your code for read-only mode](https://docs.kentico.com/documentation/developers-and-admins/deployment/read-only-deployments.md#required-project-changes), you can use [zero-downtime deployments](https://docs.kentico.com/documentation/developers-and-admins/deployment/read-only-deployments.md) when you update Xperience by Kentico.
- Maintain integrations with decoupled systems as part of regular application upkeep (e.g., review retry policies, dead-letter handling processes, or alert thresholds as traffic and message volume grow over time).

### Data maintenance

- Archive old data that is no longer needed.
- Remove unnecessary objects (e.g., unused media assets, unused reusable content items, inactive contacts, unsent emails, old contact activities, etc.).
- Update and optimize content (e.g., update outdated content, fix broken links, etc.).
- Deploy new content and changes from a staging environment to keep the production environment clear of unfinished drafts.

### Scenario

#### Large database causing performance issues

A client was utilizing nearly all available features.

Since they lacked data monitoring and a maintenance strategy, the database grew rapidly (100+ GB) and began slowing the system. Eventually, the added load exceeded the capabilities of their environment, and the site went down.

In this case, the project was a large website with hundreds of thousands of pages, and over 100 million contacts, activities, and analytics entries.

With the data cleaned up, they implemented a plan to monitor the database size and manage data growth, for example, by deleting inactive contacts and activities.

## Monitoring

Monitoring your project provides insight into what you can optimize and improve, and informs you of the solution's overall health.

### Environment

- Monitor resource utilization on the server (e.g., CPU, RAM, HDD).
  - Consider tools offered by your hosting environment, like the Xperience SaaS environment's [Monitoring tools](https://docs.kentico.com/documentation/developers-and-admins/deployment/deploy-to-the-saas-environment/manage-saas-deployments.md#application-monitoring), Azure's [Application insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview), etc.
- Monitor website availability with uptime services.
- Monitor website responsiveness / performance.
  - Consider checking the performance from different geographic locations.
- Monitor the health and limits of your messaging infrastructure (e.g., broker availability, queue throughput, or service quotas), especially if your solution depends on decoupled integrations.

### Application

- Monitor application errors, warnings, 404 errors, and other issues.
  - You can use a reporting service such as [SQL Server Reporting Services](https://learn.microsoft.com/en-us/sql/reporting-services/create-deploy-and-manage-mobile-and-paginated-reports?) to monitor entries in the _CMS\_EventLog_ table and send alerts when too many errors appear.
- Monitor message processing errors, retry rates, consumer lag, and dead-letter traffic for integrations with decoupled systems.
  - Use infrastructure-level monitoring and alerting for broker and queue health, and use the Xperience [Event log](https://docs.kentico.com/documentation/developers-and-admins/configuration/event-log.md) to investigate application-level processing failures.

### Data

- Keep an eye on online marketing data and any custom analytics data you store in your database.
  - Monitor all data, such as visitor activity, page views, etc., as they can grow rapidly during high traffic.
  - Create automatic processes to delete inactive contacts.
  - Keep online marketing data for 6 to 12 months to provide the necessary data for contact groups, marketing automation, and other marketing features.
- Monitor the size of all database tables.
- Define rules to handle outdated content.
- Monitor content for broken links.
