Tuesday, April 19, 2016

Sitecore publish to web failed - Web database full

While working on a Sitecore development environment which was using SQL Server Express, the following error came up when attempting a full publish to web:
Job started: Publish to 'web'|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Could not allocate space for object 'dbo.EventQueue'.'IX_Stamp' in database 'Sitecore_Web' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

This was because the web database had grown to 10gb, even though master was only 2gb:

 The Sitecore clean up databases wizard

In the Sitecore control panel, under database there is a clean up databases wizard:

This allows you to run a cleaner on selected databases (in this case web), which will perform some cleanups, including:
  • Deleting orphan content
  • Removing unused blogs
  • Clears all caches
Once run, your database size should be much smaller. For those with extremely large databases (hundreds of gigabits), Craig Taylor has a post on what to do if the tool fails.

Worst case for getting a SQL Server Express web database down to a manageable size (on non production environments) is to run a shrink on the database and then files in SQL Server Management Studio.

No comments:

Post a Comment