Skip to main content

Is it possible to change the timeout for Smart Object calls?

 

When I create a new REST based Smart Object using Swagger, i have the following behavior:

1. Smart Object calls my method

2. this method executes (it takes more then 3-5 minutes)

3. after 2 minutes workflow instance goes to error (msg: "Input string was not in a correct format.")

4. after 5 minutes my method finishes with execution

 

I want to extend those 2 minutes in step 3.

Hi ZoltanM


 


To increase the timeout value for SmartObjects - To affect the change, navigate to the SourceCode.SmartObjects.Runtime.config file in the following location: 

C:Program Files (x86)K2 blackpearlHost ServerBin     (If  you are using K2  blackpearl
)


or


CProgram Filesk2Host ServerBin       (if  you are using K2 five)



Find the node below and replace or create the value with the required time. 

Note: The value is reflected in seconds 

<configuration> 

<appSettings> 

<add key="commandtimeout" value="30" /> 


Restart The K2 service after making the changes and test. Let me know if this helps. 


 


Also see this link below:


https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Input-string-was-not-in-a-correct-format/td-p/89330


 


Regards


Elvis


Hi,


 


If you are using SmartObject to call your REST service, then you have to check your REST service as well if there are any timeout or default timeout being used.


 


Hi  @ZoltanM;


 


Please checkout this kb for smartobject timeout Error(https://help.k2.com/support-services/kbt133195).


If you are on 5.0 please check this hotfix(http://help.k2.com/kb003022)...


 


Hope it helps troubleshoot timeout issues on your end.


 


Regards;


Widson.


Hi ZoltanM


 


see the identical error below and how they solve it :


https://help.k2.com/support-services/kbt134411


 


Regards


Elvis


Hello Elvis,

Thank you for the answer.
Unfortunately I can not find that config file, i have the dll but not the configuration file.
Is there a way to add that config file?

Also, the issue in the link you posted, seems that it is not related to my issue, because I don't use stored procedures. My method is simple C# code.

Regards,
Zoltan
Hi,
I have error logged on K2 side 2 minutes before my service is finished with calculations. I need to set up timeout on smart object side.
Regards,
Zoltan

Hi ZoltanM


 


Note that if you click bin folder before you click Host Server you will only see dll file make sure you click Host Server Folder and bin see the path:  K2 blackpearlHost ServerBin   or   k2Host ServerBin


 


See the Kb below


http://help.k2.com/kb001204


 



 



 


Regards


Elvis


Hi again...

The connection strings previously stored in these files(K2 blackpearlHost ServerBin folder on the K2 Server) are now retrieved from the K2HostServer.exe.Config file, search for "commandtimeout", then you should be able to alter your timescale/ps.

Additionally resolve timeout issues in management(http://help.k2.com/kb002437)
Thanks;
Widson.
Hello Widson,
I changed every commandtimeout to 1000 in the config file, restarted K2Service, but still the same issue...
I managed to calculate, K2 goes to error after approximately 90 second.
Regards,
Zoltan
Hello Widson,

I think this is again the same commandtimeout parameter in config file.
Now i even increased more the timeout to 10000, restarted K2Service, but still the same issue.
The second link is regarding memory leak on K2 Five 5.0.
Currently we are on 5.3 version, so the fix should be applied already.

Regards,
Zoltan

Hi ZoltanM


 


Follow the attached  Screenshots below, let me know if this issue has been resolved




 


Regards


Elvis


Hello Elvis,
I changed every commandtimeout to 10000 in the config file (commandtimeout="10000"), restarted K2Service, but still the same issue...
I managed to calculate, K2 goes to error after approximately 90 second.
Regards,
Zoltan
Hello Elvis,
Same answer as below, I changed every commandtimeout to 10000 in the config file (commandtimeout="10000"), restarted K2Service, but still the same issue...
I managed to calculate, K2 goes to error after approximately 90 second.

Regards,
Zoltan
Hello Elvis,
Yes, the error is the same, but unfortunately no other relation to my issue...
Regards,
Zoltan

Hi ZoltanM


 


The best way is log a ticket then we will try to resolve this  issue on site.


 


Regards


Elvis


The fix for this issue is provided in the KB:

https://help.k2.com/kb003353

 

Regards,

Zoltan


Reply