No ratings

Resolving timeout issues in K2 Management

 

Resolving timeout issues in K2 Management

 

If you experience timeout issues when using K2 Management site, such as when loading the License options, add the following timeout setting in the K2HostServer.exe.config file and set a higher timeout value for your environment.

Be sure to back up your K2HostServer.exe.config file before making any modifications

Steps

  1. Add the following nodes to the K2HostServer.exe.config file under the <configSections> node. The file is located in C:\Program Files (x86)\K2 blackpearl\Host Server\Bin
    <section name="sourcecode" type="SourceCode.Configuration.SourceCodeConfigurationSection, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
    <section name="sourcecode.transientFaultRecovery" type= "SourceCode.Net.TransientFaultRecovery.Configuration.TransientFaultRecoveryConfigurationSection, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
  2. Add the following section to the root node at the end of K2HostServer.exe.config
    <sourcecode>
        <extensionElements>
          <add name="sqlDatabaseTransientDecision" type="SourceCode.Data.Sql.SqlDatabaseTransientDecision, SourceCode.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="sqlDatabaseTransactionDecision" type="SourceCode.Data.Sql.SqlDatabaseTransactionDecision, SourceCode.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="sqlNetworkConnectivityDecision" type="SourceCode.Data.Sql.SqlNetworkConnectivityDecision, SourceCode.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="exponentialIntervalStrategy" type="SourceCode.Net.TransientFaultRecovery.ExponentialIntervalStrategy, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="jitterIntervalStrategy" type="SourceCode.Net.TransientFaultRecovery.JitterIntervalStrategy, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="singleRetryPolicy" type="SourceCode.Net.TransientFaultRecovery.SingleRetryPolicy, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="multipleRetryPolicy" type="SourceCode.Net.TransientFaultRecovery.MultipleRetryPolicy, SourceCode, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
        </extensionElements>
      </sourcecode>
      <sourcecode.transientFaultRecovery>
        <decisions>
          <sqlDatabaseTransientDecision name="SqlDatabaseTransientDecision" />
          <sqlDatabaseTransactionDecision name="SqlDatabaseTransactionDecision" />
          <sqlDatabaseTransactionDecision name="SqlDatabaseTransactionDecision.NoTransaction" disableInTransaction="True" />
          <sqlNetworkConnectivityDecision name="SqlNetworkConnectivityErrorDetectionStrategy" />
        </decisions>
        <strategies>
          <exponentialIntervalStrategy name="SqlExponentialInterval" />
          <jitterIntervalStrategy name="SqlJitterStrategy" />
        </strategies>
        <policies>
          <singleRetryPolicy name="SqlConnection" decision="SqlDatabaseTransientDecision" strategy="SqlExponentialInterval" />
          <multipleRetryPolicy name="SqlCommand">
            <add name="SqlAmbientTransaction" decision="SqlDatabaseTransientDecision" strategy="SqlExponentialInterval" />
            <add name="SqlCommandTransaction" decision="SqlDatabaseTransactionDecision.NoTransaction" strategy="SqlJitterStrategy" />
          </multipleRetryPolicy>
          <singleRetryPolicy name="SqlTransaction" decision="SqlDatabaseTransactionDecision" strategy="SqlJitterStrategy" />
          <singleRetryPolicy name="SqlFailover" decision="SqlNetworkConnectivityErrorDetectionStrategy" strategy="SqlJitterStrategy" />
        </policies>
      </sourcecode.transientFaultRecovery>
      <sourcecode.data>
        <policies>
          <add name="Default" provider="SourceCode.Data.Sql.SqlDataAccessProvider, SourceCode.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" connectionPolicy="SqlConnection" commandPolicy="SqlCommand" transactionPolicy="SqlTransaction" failoverPolicy="SqlFailover">
            <execution commandTimeout="0.00:01:00" />
          </add>
        </policies>
        <exceptionFactories>
          <add name="ActionIDAlreadyExists" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ActionNameAlreadyExists" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ActionNameAndClassIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ActionNameNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ActionNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ClassIDAlreadyExists" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ClassNameAndIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ClassNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="IdentityNameAndIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="IdentityNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="NotAuthorized" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ObjectIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ObjectNameAndClassIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ObjectNameAndIDNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ObjectNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
         <add name="OwnerNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ParentClassNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="ParentObjectNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="RightsNotSpecified" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
          <add name="SessionUserIdentityNotFound" factoryType="SourceCode.Authorization.Interfaces.AuthorizationExceptionFactory, SourceCode.Authorization.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
        </exceptionFactories>
      </sourcecode.data>
  3. Modify the commandTimout value in the added <sourcecode.data><policies> node to a higher time value if you need to
    <execution commandTimeout="0.00:02:00" />
  4. Restart your K2 server

Your timout issues should now be resolved.

 

 

Consideration

This timout setting applies to all K2 SmartObject calls to the SQL database.

 

Labels: (1)
Version history
Last update:
‎05-20-2021 12:03 AM
Updated by:
Contributors