<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Iterating through the App collection makes memory usage on the server go rampant. in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136342#M5367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/2408"&gt;amien&lt;/A&gt;‌ Yes, a workaround would be to take a copy of the core application without data via something like &lt;A href="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Classes/GlobalClass/Global-class-CreateSessionAppFromApp-method.htm" title="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Classes/GlobalClass/Global-class-CreateSessionAppFromApp-method.htm"&gt;CreateSessionAppFromApp method ‒ Qlik Sense &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you could edit the load script of the copy to only load something like first 100 records of the tables and then reload the application. That would still be fast enough, low impact on ram and you would be able to extract metadata around tables and fieldnames within the application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Apr 2017 17:55:49 GMT</pubDate>
    <dc:creator>Alexander_Thor</dc:creator>
    <dc:date>2017-04-29T17:55:49Z</dc:date>
    <item>
      <title>Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136337#M5362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to collect various App data to produce a Single Configurator URL using the .NET SDK. To do that, I get the whole app list, then for each app I iterate through its NxInfo objects:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;IEnumerable&amp;lt;IAppIdentifier&amp;gt; appIds = hub.GetAppList();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;foreach (AppIdentifier appIdentifier in appIds)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; App app = (App)location.App(appIdentifier);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; IEnumerable&amp;lt;NxInfo&amp;gt; appInfos = app.GetAllInfos();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; foreach (NxInfo appInfo in appInfos)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; // Some of the properties I'm extracting (there are others, some from App)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; string appObjectType = appInfo.Type;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; string appObjectId = appInfo.Id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; // Save all properties to a CSV-file - code not shown.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;While I can extract the desired properties I get a timeout exception. What's worse, if I monitor the memory usage on the Qlik server I can see it skyrocket the moment that I start the program. I'm attaching a screenshot Task Manager during the program execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Is this normal behaviour? Am I starting all apps when iterating through the collection?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 08:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136337#M5362</guid>
      <dc:creator />
      <dc:date>2016-07-12T08:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136338#M5363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that is expected behavior. When you open a app on the server you are loading data and the object model into memory on the server and we will allocate memory accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your example you are essentially opening every available doc on the server which most likely causes you to run out of RAM if it's a small box and we start swapping to disk, hence timeouts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luckily you can open a app without data, specify noData and you should be good&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense-developer/3.0/apis/net%20sdk/html/M_Qlik_Engine_LocationExtensions_App.htm" title="http://help.qlik.com/en-US/sense-developer/3.0/apis/net%20sdk/html/M_Qlik_Engine_LocationExtensions_App.htm"&gt;LocationExtensions.App Method&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 11:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136338#M5363</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2016-07-12T11:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136339#M5364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just had the chance to try the suggested method and it works! I'm now able to iterate through the App-collection and retrieve the app metadata without getting any timeouts or a huge increase in memory consumption. Thanks! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 08:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136339#M5364</guid>
      <dc:creator />
      <dc:date>2016-07-14T08:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136340#M5365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome! Also make sure that the user you are using is allocated a user license and not login licenses as that would exhaust your license pool fairly quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do believe the .Net SDK supports/will support direct connection to QIX also. That would allow you to connect using certificate authentication, bypassing the proxy and in the process not consuming any tokens. Perfect for back-end services. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 09:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136340#M5365</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2016-07-14T09:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136341#M5366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the down side is that you won't be able to extract tables and fieldnames with nodata?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Apr 2017 10:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136341#M5366</guid>
      <dc:creator>amien</dc:creator>
      <dc:date>2017-04-29T10:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through the App collection makes memory usage on the server go rampant.</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136342#M5367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/2408"&gt;amien&lt;/A&gt;‌ Yes, a workaround would be to take a copy of the core application without data via something like &lt;A href="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Classes/GlobalClass/Global-class-CreateSessionAppFromApp-method.htm" title="http://help.qlik.com/en-US/sense-developer/3.2/Subsystems/EngineAPI/Content/Classes/GlobalClass/Global-class-CreateSessionAppFromApp-method.htm"&gt;CreateSessionAppFromApp method ‒ Qlik Sense &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you could edit the load script of the copy to only load something like first 100 records of the tables and then reload the application. That would still be fast enough, low impact on ram and you would be able to extract metadata around tables and fieldnames within the application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Apr 2017 17:55:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Iterating-through-the-App-collection-makes-memory-usage-on-the/m-p/1136342#M5367</guid>
      <dc:creator>Alexander_Thor</dc:creator>
      <dc:date>2017-04-29T17:55:49Z</dc:date>
    </item>
  </channel>
</rss>

