<?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: Internal Server Error everytime I load the script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1920488#M75767</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175005"&gt;@YassineB_23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you increase the Logging level to "Error" and verify if you get a more descriptive error?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Administer/Advanced-configuration.htm" target="_blank"&gt;https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Administer/Advanced-configuration.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Kind Regards.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 13:25:14 GMT</pubDate>
    <dc:creator>NadiaB</dc:creator>
    <dc:date>2022-04-20T13:25:14Z</dc:date>
    <item>
      <title>Internal Server Error everytime I load the script</title>
      <link>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1918394#M75522</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;Im having a problem while loading my script which uses Google Drive Connector (WebConnector). Im looping through 26 google sheet files to load them into Qlik and then concatenate them all. But I always get the same error ,"Internal Server Error", and it doesn't always fail at the same line. I already managed to make it work, but with less files.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YassineB_23_0-1649921157041.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77087i5D45F7876F7084E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YassineB_23_0-1649921157041.png" alt="YassineB_23_0-1649921157041.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YassineB_23_1-1649921243404.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/77092iEB8E6E47BE22C854/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YassineB_23_1-1649921243404.png" alt="YassineB_23_1-1649921243404.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Each file represents a different MonthYear value. Please find an example of the script log attached. Thanks for your Help.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 07:52:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1918394#M75522</guid>
      <dc:creator>YassineB_23</dc:creator>
      <dc:date>2022-04-20T07:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Server Error everytime I load the script</title>
      <link>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1918403#M75525</link>
      <description>&lt;P&gt;Same problem here!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 07:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1918403#M75525</guid>
      <dc:creator>BREEZE</dc:creator>
      <dc:date>2022-04-14T07:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Server Error everytime I load the script</title>
      <link>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1920488#M75767</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175005"&gt;@YassineB_23&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you increase the Logging level to "Error" and verify if you get a more descriptive error?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Administer/Advanced-configuration.htm" target="_blank"&gt;https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Administer/Advanced-configuration.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Kind Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 13:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1920488#M75767</guid>
      <dc:creator>NadiaB</dc:creator>
      <dc:date>2022-04-20T13:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Server Error everytime I load the script</title>
      <link>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1936869#M77224</link>
      <description>&lt;P&gt;Did you find a solution to this issue?&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175005"&gt;@YassineB_23&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/175010"&gt;@BREEZE&lt;/a&gt;&amp;nbsp;. I ended up putting the command&lt;/P&gt;
&lt;P&gt;sleep 1000;&lt;/P&gt;
&lt;P&gt;in my loops which helps it get further in the load but then I still ended up with Internal Server Error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would suggest to me its a limit issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I updated my logging level to error as suggested above and in the error details section of the latest web connector log file I get this&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  "error": {
    "code": 429,
    "message": "Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'sheets.googleapis.com' for consumer 'project_number:560254647742'.",
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "RATE_LIMIT_EXCEEDED",
        "domain": "googleapis.com",
        "metadata": {
          "consumer": "projects/560254647742",
          "quota_metric": "sheets.googleapis.com/read_requests",
          "quota_limit": "ReadRequestsPerMinutePerUser",
          "quota_limit_value": "100",
          "service": "sheets.googleapis.com",
          "quota_location": "global"
        }&lt;/PRE&gt;
&lt;OL&gt;
&lt;LI&gt;I am looping through 243 spreadsheet keys to get all the relevant worksheet keys&lt;/LI&gt;
&lt;LI&gt;Then I am looping to get all the data from those sheets (729 worksheets)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;So definitely hitting the 100 limit several times&lt;/P&gt;
&lt;P&gt;I know google sheets api has a default limit of 300&amp;nbsp;&lt;SPAN&gt;Per minute per project&lt;/SPAN&gt; so I am not sure why its 100 on the google connector.&lt;A href="https://developers.google.com/sheets/api/limits" target="_self"&gt;&amp;nbsp;https://developers.google.com/sheets/api/limits&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I don't know who sets this limit, Qlik, Google or Local IT admin.&lt;/P&gt;
&lt;P&gt;But as a temporary measure, I decided to use the for next loop variable to check if the current load is divisible by 100, wait 5 secs, then continue to load, otherwise just loop as normal.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a crude example below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;Let SSNumOfRows= NoOfRows('GetSpreadsheets');
For i=0 to $(SSNumOfRows)-1
	//due to limit Read requests per minute per user of service 'sheets.googleapis.com, adding delay after every 100 loads
    //without this it will cause an Internal Server Error
    
	if Mod($(i), 100 )=0 THEN
         TRACE;
         TRACE reached another 100 requests, waiting 5 secs;
         TRACE;
         Sleep 5000;
    
	Let vSpreadsheetKey = Peek('SpreadsheetKey', $(i),'GetSpreadsheets');
   
   	GetWorksheets:
      LOAD
    replace(worksheetKey,':','%3a') as WorksheetKey //needed for correct URL format to load sucessfully

      FROM [$(vConnectionName)]
      (URL IS [http://localhost:5555/data?connectorID=GoogleDriveConnector&amp;amp;table=ListWorksheets&amp;amp;spreadsheetKey=$(vSpreadsheetKey)&amp;amp;appID=], qvx);
      
      ELSE //load count not divisible by 100
      
      Let vSpreadsheetKey = Peek('SpreadsheetKey', $(i),'GetSpreadsheets');
   
        GetWorksheets:
          LOAD
              replace(worksheetKey,':','%3a') as WorksheetKey //needed for 
          FROM [$(vConnectionName)]
          (URL IS [http://localhost:5555/data?connectorID=GoogleDriveConnector&amp;amp;table=ListWorksheets&amp;amp;spreadsheetKey=$(vSpreadsheetKey)&amp;amp;appID=], qvx);
      
      ENDIF
      &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked fine for part 1 above, but I still have an error in part 2!&lt;/P&gt;
&lt;P&gt;Turns out this was a different error!&lt;/P&gt;
&lt;PRE&gt;&amp;lt;Message&amp;gt;Error requesting table GetWorksheetV2 for GoogleDriveConnector&amp;lt;/Message&amp;gt;
        &amp;lt;Exception&amp;gt;APIConnectorInterfaces.Exceptions.QwcException: No columns returned for QlikWebConnectors:GoogleDriveConnector.GetWorksheetV2&lt;/PRE&gt;
&lt;P&gt;Now I need to check whether the table is populated BEFORE loading.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone know how to do that?&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I am using GetWorksheet V2 and ListWorksheet.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Using Qlik WebConnectors&amp;nbsp;&lt;SPAN&gt;March-2022 (2.122.1.25087)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;found correct errors by searching times they stopped loading/failed&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sat, 28 May 2022 22:13:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Internal-Server-Error-everytime-I-load-the-script/m-p/1936869#M77224</guid>
      <dc:creator>Onyi_Nwabia-Robbins</dc:creator>
      <dc:date>2022-05-28T22:13:22Z</dc:date>
    </item>
  </channel>
</rss>

