Keyfactor Command Changing SQL Retry Settings
The SQL retry settings are found in the app settings configuration files for the Service, WebConsole, ClaimsProxy, WebAgentServices, KeyfactorAPI An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command., and CAConnectorAPI applications and allow you to view or modify the configuration settings related to the connection to the SQL database. Any changes must be made to match for all applications.
Windows Installations Under IIS
The settings for SQL retries are configured in the appsettings.json file in each of the Keyfactor Command program folders Service, WebConsole, ClaimsProxy, WebAgentServices, KeyfactorAPI, and CAConnectorAPI, located by default at:
To update the appsettings.json file for SQL configuration:
- Navigate to the \Configuration folder on your server for each of the Keyfactor Command program folders.
- Browse to open the appsettings.json file in a text editor (e.g. Notepad) and adjust the values as needed.
- Save the files.
Figure 462: Sample Appsettings.json File for SQL Retry Settings
Container Installations Under Kubernetes
The configurations from the appsettings.json file can be updated in one of two ways for container installations:
-
To update one or two settings, set an environment variable in your custom values file.
-
To update a large number of settings or the entire contents of the appsettings.json file, create a config map containing the appsettings.json file contents and mount it as a volume to replace the existing appsettings.json file.
To set an environment variable for one or two configuration values:
-
On your Kubernetes server, edit your values file to add an additionalEnvironmentVariables section (if one does not already exist) and environment variable name(s) and value(s) for the setting(s) to change. For example, the following shows a portion of the example values file (see Install Keyfactor Command in Containers Under Kubernetes) with the SqlRetryConfiguration_NumberOfTries value set to 6 and the SqlRetryConfiguration_MaxTimeInterval value set to 00:02:30.
additionalEnvironmentVariables: - name: SqlRetryConfiguration_NumberOfTries value: '6' - name: SqlRetryConfiguration_MaxTimeInterval value: '00:02:30' volumes: - name: root-cas configMap: name: ca-roots items: - key: ca-certificates.crt path: ca-certificates.crt volumeMounts: - name: root-cas mountPath: /etc/ssl/certs/ca-certificates.crt subPath: ca-certificates.crt
Note: Parameters are referenced by full name, including parent parameter A parameter or argument is a value that is passed into a function in an application. name, if applicable. A SQL retry configuration setting would be, for example, SqlRetryConfiguration_NumberOfTries. -
Load the new values, referencing the deployment name, namespace, your customized values file, the helm chart, and version. For example:
sudo helm upgrade Helm_Deployment_Name --namespace keyfactor-command --values values-local.yaml oci://repo.keyfactor.com/charts/command --version 1.0.0
Configuration Settings
The following table shows the configuration settings for SQL retry available in the Keyfactor Command Service, WebConsole, ClaimsProxy, WebAgentServices, KeyfactorAPI, and CAConnectorAPI appsettings.json files.
Table 95: Appsetting.json file - SQL Retry Parameters