The Citrix Broker Service experiences memory usage spikes, with memory consumption increasing significantly over a short period. This may lead to degraded performance or instability on the Delivery Controller.
Affected Environments:
CVAD environments with manually provisioned VDAs or PVS VDAs provisioned via the CVAD Setup Wizard.
CVAD environments with these combinations of Delivery Controller and VDA versions:
Delivery Controller: 2311, 2402, 2402 CU1, 2407, 2411
Unaffected Environments:
Non-AD Domain Joined VDAs
Upgrade Recommendation: Customers should upgrade their Delivery Controllers (DDCs) to version 2411 or higher and all VDAs to version 2411 or higher.
LTSR 2402 Customers: A solution will be included in a future Cumulative Update (CU) release.
In the meantime, you can implement the following steps as a workaround based on your deployment type. Please note that these steps are unnecessary if both the DDCs and VDAs are upgraded to the recommended versions.
The following three registry settings should be added to the affected VDAs:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket
Name: CustomerId, Type: REG_SZ, Value: CitrixOnPremises
Name: SiteAddress, Type: REG_SZ, Value: https://localhost
Name: VirtualSiteId, Type: REG_SZ, Value: 00000000-0000-0000-0000-000000000000
To determine if a VDA is affected and requires a workaround, follow these steps:
Check Unaffected Environments: If the VDA is listed in the "Unaffected Environments" section, the VDA is not impacted and no action is needed.
Check Affected Environments and VDA/DDC Version: If the VDA and its corresponding DDC version are listed in the "Affected Environments" section, the VDA is affected and requires the following workaround:
Create a new version of the PVS vDisk in private mode
Boot a target VM in maintenance mode, change the registry settings directly and shutdown
Promote the new vDisk version to Production and reboot all VDAs using it.
Create a new version of the PVS vDisk in private mode
Boot a target in maintenance mode and use ‘ctxreg’ to update the required settings and then shutdown:
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “CustomerId” -d “CitrixOnPremises” --force
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “SiteAddress” -d “https://localhost” --force
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “VirtualSiteId” -d “00000000-0000-0000-0000-000000000000” --force
Promote the new vDisk version to Production and reboot all VDAs using it.
Open Group Policy Management Console (GPMC).
Create a new GPO or edit an existing GPO.
Add the required registry settings.
Apply the GPO to the necessary organizational units (OUs) or directly to the impacted VDA machines.
Allow time for the GPO to propagate and 1 more hour for the change to take effect (it is not required to reboot the VDA machine or to restart the Broker Agent service).
Manual Linux VDAs: Use `ctxreg` to update the required registry settings on every VDA:
Run the following commands on every VDA:
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “CustomerId” -d “CitrixOnPremises” --force
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “SiteAddress” -d “https://localhost” --force
sudo /opt/Citrix/VDA/bin/ctxreg create -k “HKLM\SYSTEM\CurrentControlSet\Services\CitrixBrokerAgent\WebSocket” -t “REG_SZ” -v “VirtualSiteId” -d “00000000-0000-0000-0000-000000000000” --force
Allow 1 hour for the changes to take effect or restart the Broker Agent Service to make the changes effective immediately.
Run the following SQL script to remove duplicate VDA service keys from the TrustSchema.ServiceKeys table:
---------------------------------------------------------------------------------------------- -- Delete the duplicate VDA service keys in the TrustSchema.ServiceKeys table ---------------------------------------------------------------------------------------------- DECLARE @IndexForMachineSidInInstanceId INT = 38 DECLARE @SidMaxLength INT = 225 DELETE FROM TrustSchema.ServiceKeys WHERE Uid IN ( SELECT Uid FROM ( SELECT Sid, Uid, ROW_NUMBER() OVER(PARTITION BY Sid ORDER BY Uid DESC) AS RankId FROM ( SELECT SUBSTRING(InstanceId, @IndexForMachineSidInInstanceId, @SidMaxLength) AS Sid, Uid FROM TrustSchema.ServiceKeys WHERE ServiceName = 'vdaservice' AND CHARINDEX('-S', InstanceId) > 0 ) tempTableOfDuplicateKeys ) tempTableOfDuplicateUids WHERE RankId > 1 ) |
When the Broker Agent Service starts, it attempts to retrieve a registered VDA service key from its local storage. If it cannot find one, it registers a new VDA service key with the FMA Trust Service. However, due to an issue, the service fails to retain the key to its local storage. As a result, each time the service starts, the process repeats.
Over time, this leads to an accumulation of VDA service keys in the service key table of the FMA Trust Service. Compounding this issue, the table lacks an index on the InstanceId column. As the number of keys grows, searching the service key table places a significant load on the SQL database, slowing down database operations. This increased load eventually leads to database deadlocks, further degrading performance.
The overall impact is that most operations of the Delivery Controller (DDC) become extremely slow or fail to complete.