< class="prominent-subhead ">

SmartObject Service Tester time out error

~~repeating-content.html~~
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

An error is displayed when executing very long running processes: "Object '...rem' has been disconnected or does not exist at the server".

Symptoms

To confirm, please do the following:

1. Create a new IIS site and a new WCF Service Application.

2. Add the following function:

string ITestService.TestLongRunningProcess(int secondsTimeout) { System.Threading.Thread.Sleep(secondsTimeout * 1000); return "OK"; }


3. By using the SmartObject Service Tester, register a new service instance and set the "Timeout (Seconds)" parameter to 3600. 

4. Then, create a SmartObject for the "TestLongRunningProcess" function.

5. Run the following tests using the SmartObject Service tester tool: 
Execute TestLongRunningProcess with secondsTimeout = 5. After 5 seconds, I got "OK". 
Execute TestLongRunningProcess with secondsTimeout = 300. After 300 seconds, I got "OK". 
Execute TestLongRunningProcess with secondsTimeout = 310. After 310 seconds, the system shows the error.

Troubleshooting Steps

Please follow these steps to resolve this issue:

1. Install K2 4.7 March 2018 Cumulative Update Fix pack 1 (You can download it here: https://help.k2.com/kb002282?z=636700796193000052)
2. Stop the K2 Sever
3. Open K2HostServer.exe.config (K2 Blackpearl folder->HostServer->Bin)
4. Search for the word “timeout” and add the attribute “appdomainproxytimeout” then specify your desired timeout. Please see the below config as an example:

<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)\K2 blackpearl\ServiceBroker" bufferrecords="20000" commandtimeout="30" allowexponent="false" appdomainproxytimeout="10">

5. Restart the K2 server and test.
6. Increase the WCF instance services timeout as well.