When creating app layers in Azure, the task fails with “Azure Server Busy” errors.
If you consistently receive the error, you can reduce the chances that it will happen again by editing the Azure Timeouts available in the Azure Connector Configuration file: config.json.
The timeout settings can slow the transfer of data and maintain a transfer speed that is acceptable. Longer timeout settings may slow the total transfer time, but not by a noticeable amount.
Below is an overview of the configurable settings for the Azure Connector. You can configure each of these based on what works best in your environment.
Azure Connector Timeout Settings
These settings control various timeouts and retries for various connector operations. They appear in the azureTimeouts section of the config.json file located here: /usr/local/lib/node_modules/unidesk-azure-connector/config.json
Setting | Description | Default |
createVHDFromPageBlobNumRetries | Number of times to retry downloading a VHD from Azure. This applies to creating a new OS layer and finalizing OS/App/Platform layers. | 10 |
createVHDFromPageBlobFactor | The exponential back-off factor to wait between retries: time = minTime * factor ^ (retryNum – 1) | 1 |
createVHDFromPageBlobMinTimeoutInMs | The minimum amount of time in milliseconds to wait between retries when downloading a VHD from Azure. | 10000 |
createVHDFromPageBlobThreadCount | The number of threads used for parallel download operations. | 5 |
createPageBlobFromVHDThreadCount | The number of threads used for parallel upload operations. | 32 |
createVHDFromPageBlobCancelCheckInternalInMs | The interval at which we check for a cancel event. The default interval is 60 seconds. | 60000 |
If you are receiving consistent “503 Azure Server Busy” errors
You can modify the Azure Connector Timeouts according to your situation. It is recommended that you:
- Increase the createVHDFromPageBlobNumRetries count from 10 to something higher.
- Reduce the count of createVHDFromPageBlobThreadCount and createPageBlobFromVHDThreadCount, with 1 being the lowest.
Example:
“azureTimeouts”: {
“createVHDFromPageBlobNumRetries”: 12,
“createVHDFromPageBlobMinTimeoutInMs”: 5000,
“createVHDFromPageBlobFactor”: 2,
“createVHDFromPageBlobThreadCount”: 3,
“createPageBlobFromVHDThreadCount”: 1
}
To change the settings in a way that will NOT persist an upgrade
When you want to modify the Azure connector Timeout values to see what values work in your situation, and you don’t want the changes you make to persist beyond the next upgrade, follow these steps to change the values in customer-config.json.
1. Log into the ELM via Putty
2. Open the config.json file for editing:
/usr/local/lib/node_modules/unidesk-azure-connector/config.json
3. Edit the Azure Timeout settings.
4. Save your changes.
4. Restart the Connector by entering the following command:
systemctl restart unidesk-azure-connector
The new values will appear in the log:
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts,
timeout createVHDFromPageBlobNumRetries = 12
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts,
timeout createVHDFromPageBlobMinTimeoutInMs = 5000
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts,
timeout createVHDFromPageBlobFactor = 2
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts,
timeout createVHDFromPageBlobThreadCount = 3
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts,
timeout createPageBlobFromVHDThreadCount = 1
To change the settings in a way that persists beyond an upgrade
Note: This is available in 21.4 and later
When you are ready to set Azure connector Timeout values to persist beyond the next upgrade, follow these steps to change the values in customer-config.json.
Note: The customer-config.json is available for editing in App Layering 21.4 and later.
1. Log into the App Layering appliance (also called the ELM) via putty.
2. Navigate to:
/usr/local/lib/node_modules/unidesk-azure-connector/
3. Enter the following command to create a customer-config.json file:
`touch customer-config.json`
4. Edit the default Azure Timeout settings.
5. Save your changes.
6. Restart the connector using the following command:
systemctl restart unidesk-azure-connector
Example customer-config.json
{
“azureTimeouts”: {
“createVHDFromPageBlobNumRetries”: 20,
“createVHDFromPageBlobThreadCount”: 7,
“createPageBlobFromVHDThreadCount”: 2
}
}
Note: ELM will automatically read all config files from /usr/local/lib/node_modules/unidesk-azure-connector/
The new values will appear in the log:
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts from customer config file…
[2021-03-25T14:06:37.688Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts, timeout createVHDFromPageBlobNumRetries = 20
[2021-03-25T14:06:37.689Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts, timeout createVHDFromPageBlobThreadCount = 7
[2021-03-25T14:06:37.689Z] INFO: Index/1457 on localhost.localdomain: Overriding AzureTimeouts, timeout createPageBlobFromVHDThreadCount = 2