XenDesktop Database Transaction Log Growing Excessively

XenDesktop Database Transaction Log Growing Excessively

book

Article ID: CTX126916

calendar_today

Updated On:

Description

Citrix XenDesktop database transaction logs grow rapidly, which might result in the volume containing the DB files running out of disk space.  In this scenario the DB will be unable to process new transactions and may cause a site outage.

 

Environment

This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.

Resolution

Ensure that the database is configured to use the Simple recovery model as described in the following procedure:

Note: This procedure does not apply if using database mirroring which requires the Full setting.  Please also review the material in the additional resources section prior to making changes to your database.

Set the database recovery model to Simple:

  1. Select Database and then right-click.

  2. Select Properties.

  3. Select Options.

  4. Under Recovery Model, choose Simple, as displayed in the following screen shot:

    User-added image

As an alternative to set the recovery model, backup the transaction log more frequently to free the inactive portion.

Note: You must do a full Backup of the database before you can do a transaction log backup.

Example:
backup log xddatabase to disk = 'C:\XDbackup\test_1.trn'.


Problem Cause

The XenDesktop database contains both configuration and state information, which must be updated often.

A single Virtual Desktop Agent (VDA) inactive for an hour generates approximately 62 kilobytes of transaction log data.

Following are the average transaction log calculations:

Number of Virtual Desktop Agents x 24 Hours x approximately 62 kilobytes of data.

Example 10 VDA Farm in idle state:
10 VDA x 24 x 62K = 14.8 megabytes

Note: This can be substantially higher in active environments.

Issue/Introduction

This article resolves the issue "Citrix XenDesktop database transaction logs are growing rapidly, which might result in running out of disk space and the inability to connect to the clients."

Additional Information

http://msdn.microsoft.com/en-us/library/ms189275.aspx

https://docs.microsoft.com/en-us/sql/relational-databases/logs/manage-the-size-of-the-transaction-log-file

https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/view-or-change-the-recovery-model-of-a-database-sql-server

https://www.citrix.com/blogs/2014/05/16/xendesktop-sql-transaction-log-usage/