24x7x365 Entisys360 Client Technical Support: Call (877) 368-4797 opt 9, or

By Troy Couch, Enterprise Architect, Entisys360

Citrix Virtual Apps and Desktops (formerly known as Citrix XenApp/XenDesktop) leverages SQL Server to host the required Site database. Citrix and Entisys360 recommend a highly available SQL Server deployment as a best practice. A highly available SQL Server setup should protect against a database outage, but there are times when communication can be lost which would impact user connections. When this occurs, Citrix falls back on a feature called Local Host Cache (LHC) to continue connection brokering during the outage. LHC was available in 6.5 and prior versions, but was not brought back until 7.12 (LHC also replaced the connection leasing feature delivered in XenDesktop 7.6).

The one flaw in using LHC as a fall back is if the LHC itself becomes corrupted. The most common causes for LHC corruption are an orphaned SID, bad icon file or rebooting during the import process. If this happens and connection to the database fails, the LHC will fail to operate as expected which creates an outage.

Some blogs and support articles have stated this has been fixed in newer releases (7.14+), but the latest round of issues that led to this write-up occurred with a long-time client running a Virtual Apps and Desktops 7.18 environment (Note: You should know that from now on Citrix will be using a YYMM format for all future releases similar to Windows 10).

Citrix does have a couple articles about the corrupt LHC issue namely CTX228758 and CTX230775, but a non-Citrix blog provides the best explanation – https://citrixguyblog.com/2017/08/22/localhostcache-error-505-the-citrix-config-sync-service-failed-an-import/. There are 3 significant parts of this article

  1. It explains how to enable the import logging
  2. Second, it points out the folder should be deleted completely when performing an LHC reset per the Citrix articles
  3. The most critical take away is that any environment configured with LHC *must* have alerts in place to determine when an import fails on any Delivery Controller. One of the best sources for the Windows events is here https://blog.citrix24.com/xendesktop-7-15-local-host-cache-explained/ under the Monitoring section. The following are the events that should be monitored with whatever Windows Event ID monitor solution you leverage. (Note: The 505 Error is the most critical)

Local Host Cache Event IDs to Watch

Error505Citrix High Availability ServiceBroker ServerAn import to the local DB failed; see below for more information
Information3500Citrix Broker ServiceBroker ServerThe Citrix Broker Service has detected that the issue with communication with the database has been resolved and will resume normal brokering activity using configuration in the main site database.
Information3501Citrix Broker ServiceBroker ServerThe Citrix Broker Service has detected an issue with communication with the database. To preserve functionality, responsibility for brokering requests will be handed over to the Citrix High Availability Service using locally cached site configuration.
Information3502Citrix High Availability ServiceBroker ServerThe Citrix High Availability Service has become active and will broker user request for sessions until the issue discovered with the normal brokering activity is resolved.
Information3503Citrix High Availability ServiceBroker ServerThe issue discovered with the normal brokering activity has been resolved, and the Citrix High Availability Service has now stopped participating in brokering user requests for sessions

Monitoring these events should help identify:

  1. If a LHC import failed…
  2. If a LHC became active…

So in a nutshell….

  1. Monitor for 505 error on all Delivery Controllers as part of your basic deployment.
  2. If a 505 error occurs, run the PS script under CTX230775 to look for orphaned SIDs on the Delivery Controller experiencing the issue, and clean them up.
  3. If a 505 error continues, enable logging per the ‘Citrixguyblog.com’ article on the Delivery Controller experiencing the issue,. Then look for the icon generating the error and fix it.
  4. If a 505 error continues, perform the LHC reset at Step 3 under CTX230775 BUT also delete any garbage found in C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\ during the process on the Delivery Controller experiencing the issue.
  5. Import should work after that. Continue to monitor for 505 because this will all happen again.

We would like to thank Lucas Doran (long time client and part of the Entisys360 family) for his contribution to this write-up.

Written by: Troy Couch

Our Expertise

Security and Cyber Risk Services

Creating a strategy for managing risk and compliance, while helping to filter the noise of myriad cybersecurity technologies.

Automation and Cloud

Accelerating IT service delivery for our clients through the adoption of agile methodologies that are all part of a systems-oriented approach.

End User Computing

Helping businesses keep infrastructure uptodate, minimizing security risks, and maintaining compliance

Software Defined Data Center

Empowering your enterprise to achieve its full potentialand greatest efficiencyby keeping IT infrastructure operational, available and secure.

Core Infrastructure Services

Offering design, implementation, licensing optimization, and environmental services to ensure the use of Microsoft’s best practices and configurations.

Microsoft Expertise

Helping set goals and establishing benchmarks for the journey toward the successful deployment of Microsoft solutions.

Our Services


Enjoy a stressfree implementation that comes through the knowledge and experience of our professional services team.

Managed Services

Align your business initiatives with evolving industry trends to obtain a clear understanding of the impact of future technologies.

Cloud Strategy
and Services

Meeting a diverse range of business requirements through deployments that are flexible, scalable, and have the right mix of elements.


Never miss another maintenance or warranty contract renewal date or pay for unused maintenance contracts or warranties.


Through this service, our project management team takes the lead role in planning, executing, monitoring and closing projects.

Our Markets and Market Support Vehicles


Professional services and nationallyrecognized expertise that align perfectly with the trends and challenges facing a variety of industries.


Recognizing the unique challenges faced by healthcare IT organizations, and offering understanding, capabilities, and trusted relationships.

Public Sector

Helping organizations contain costs maintain high availability while finding new ways to increase security, compliance and more.

Group Purchasing

Industryleading IT consulting services and technology solutionsaccessed through a streamlined contracting process.



Learn about our upcoming events and webinars.

Solutions Literature

Accesstodownloadable assets with information on solutions and services offerings.


Gain expert technical insights around today’s leading enterprise technologies and solutions.

Press Releases

Read news and updates from the Entisys360 team.

News Stories

Learn about new developments with Entisys360 and our team.

About Entisys360

About Entisys360

Our mission, vision, leadership and team


Notable industry awards and recognition


Entisys360’s and its commitment to privacy


Our commitment to the community


Entisys360 Career opportunities

Contact Us

Entisys360 locations and contact resources