SQL Server Service Instance Timeouts

  • 15 March 2016
  • 0 replies
  • 32 views

Badge +9


 

If you create or update a SQL Server Service Instance you getting the following error message:

 

 

 

13311iB3461BB0EDAD7459.png

 

 

 

In most of the cases this issue caused by large number of objects within database (tables, views, stored procedures). Every single view, table and stored procedure that the K2 service account has rights to will be verified. If your database is small in terms of those objects this is of minor concern. If it has thousands of objects this may cause an error shown above as K2 will timeout before it can validate everything.

 

 

 

To deal with this problem you can increase command timeout. Current versions of K2 expose this a setting when you register SQL service instance:

 

 

 

10920i4859DD74C9B4D000.png

 

 

 

In older versions this setting was not exposed in SQL Server Service Instance properties and additionally for  cases when this problem happens with service instances which use SQL broker without explicitly registered SQL service instance (example Workflow Reporting Services - it has its own SI type which not exposes command timeout setting) you can edit K2HostServer.exe.config and find this section:

 


<sourcecode.smartobjects.runtime smartObjectDependencyClassId="9812F4EA-75C9-48C1-83DB-578FCCE0CBC7" smartObjectServicesDependencyClassId="BB063376-0A7B-4849-BE59-49CDF511DC91" smartObjectServicesTypeDependencyClassId="EA60367A-5E41-4889-8F64-E1E494A77675" servicebrokerpath="C:Program Files (x86)K2ServiceBroker" bufferrecords="20000" allowexponent="false" commandtimeout="30">

 

 

 

Increase the value for the commandtimeout="30" from default 30 to a higher value of 60 or 90. Save changes in config file and restart K2 service.

 

 

 

In case you have SQL DB with huge number of objects out of which you only need some you can consider denying K2 service account access to the objects you don't need - it may allow you to resolve this issue without increasing default command timeout value.



 

0 replies

Be the first to reply!

Reply