Hello 'Qlikers', I'm a developer using Qlik Sense .NET SDK, I had this exception :"System.TimeoutException: Method ""GetSheet"" timed out at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask
Can anyone help me?
Cheers
That makes more sense. The "Children" property will call "GetLayout" on the sheet under the hood. If your app is ~10gb, then it's quite likely that it takes more than 30 seconds (the default timeout) to compute the layout. I believe there are two options for you to try out:
1) Increase the timeout as I mentioned in an earlier post.
2) Use a combination of "GetChildInfos" and "GetObject" instead of going through the "Children" property.
Option 2 will not force a layout computation, so it might be more efficient in your case. An example of this method can be found here:
PublicExamples/AppPreload at master · AptkQlik/PublicExamples · GitHub
In particular, you can see the combined use of "GetChildInfos" and "GetObject" at the following line:
PublicExamples/AppPreload.cs at master · AptkQlik/PublicExamples · GitHub
Is there anything exceptional about the app or sheet? Like many objects, many sheets? You can try and see if you can get some other object from the app. Otherwise, you can always increase the timeout. You do that through the static property on RpcConnection.Timeout Property. So do something like this to turn the timeout off:
RpcConnection.Timeout = Int32.MaxValue;
Hi,
Thank you for the response, sorry for the lack of information
The app is ~10gb, I've a method that has all the ids (string) and iterates through it and executes GetSheet(id), but it throws the exception
The sheets have around 3-4 objects each, its seems while debugging I think I found the problem, it's when I use one of the sheets Children property, do you know anything about that?
Cheers
That makes more sense. The "Children" property will call "GetLayout" on the sheet under the hood. If your app is ~10gb, then it's quite likely that it takes more than 30 seconds (the default timeout) to compute the layout. I believe there are two options for you to try out:
1) Increase the timeout as I mentioned in an earlier post.
2) Use a combination of "GetChildInfos" and "GetObject" instead of going through the "Children" property.
Option 2 will not force a layout computation, so it might be more efficient in your case. An example of this method can be found here:
PublicExamples/AppPreload at master · AptkQlik/PublicExamples · GitHub
In particular, you can see the combined use of "GetChildInfos" and "GetObject" at the following line:
PublicExamples/AppPreload.cs at master · AptkQlik/PublicExamples · GitHub
Thank you very much for your reply, I've tried the GeChildInfos, and it's pending.
I pinned which sheet was pending, and on Qlik Hub I can see it loading, is there a way to load the child info without loading the data? I just want to get the dimensions and measures, I don't need the data
Cheers
If you only want the properties, then I think you should be able to use the "open app without data" option. Check out the "noData" parameter for this method: Hub.OpenApp Method
You really helped me, I just have one question, is there a way if I open an app without data, that I can close it by code and open again with data? I've a method to get the structure and other to get data, but the connection persists
Cheers
You need to use two different instances of the "Hub" class to open the app with and without data. Something like this:
using (var hub = location.Hub())
using (var app = hub.OpenApp(appId.AppId, noData: true))
{
Console.WriteLine("App: " + app.GetAppProperties().Title);
}
using (var hub = location.Hub())
using (var app = hub.OpenApp(appId.AppId, noData: false))
{
Console.WriteLine("App: " + app.GetAppProperties().Title);
}
Or you can use the LocationExtensions.App Method directly on the location, which does virtually the same thing as the above like this:
using (var app = location.App(appId, noData: true))
{
Console.WriteLine("App: " + app.GetAppProperties().Title);
}
using (var app = location.App(appId, noData: false))
{
Console.WriteLine("App: " + app.GetAppProperties().Title);
}
Thank you again for you reply, but I get the following error : "Qlik.Engine.MethodInvocationException: App already open [1002]:App already open()", I'm using Qlik Server and when I open an app without data it keeps without data until I restart the service and open with data, I need to open the same app with different connections/sessions, but I can't
Perhaps you have the app open in a browser somewhere? In that case you should probably add an explicit session when opening the app that differs from the client session. Something like this:
using (var app = location.App(appId, session: Session.Random, noData: true))