[Resolved] API Requests

The Welkin Suite Forum

[Resolved] API Requests



[Resolved] API Requests

  • Please log in to reply

#1

ron.planken

    Posted 22 Apr 2015

    I was wondering how many API requests the Welkin Suite makes every minute/hour? Yesterday we got an error in our DEV org because I single handely hit the API limit by using nothing but the Welkin Suite. In one day I used up 14.178 API requests which filled up our 15.000 limit. I left my PC running overnight with The Welkin Suite open and it seems to have kept a connection open which used up all the requests. 


    It seems to have do to something with my Apex class not being able to be uploaded. I tried to change my constructor for my extension from a StandardController to a StandardSetController but after pressing the build button nothing seemed to be happening. The Welkin Suit was stuck on building. After I manually tried to cancel nothing happend.


    When I tried to edit the file online it gave me the following error: 

    common.apex.runtime.bytecode.BytecodeApexObjectType cannot be cast to common.apex.runtime.impl.ApexType


    According to the stuff i found online it has something to do with the Tooling Api. The Welkin Suite seemed to be stuck in the building phase which caused all the api requests to pile up.



    3 replies to this topic

    #2

    vlgubanovich

      Posted 22 Apr 2015

      Hi Ron,


      We've had an issue with infinite build prior to the release on April 14th - when Salesforce was handling request very slow TWS got stuck.

      After April 14th logic for handling that situation with build is following:

      • First 60 seconds - pull for result each 1 second
      • 01:01 - 02:59 - pull for result each 5 seconds
      • 03:00 - 9:59 - pull for result each 10 seconds
      • 10:00 - 59:59 - pull for result each 60 seconds
      • After 60 minutes without changes - cancel build (and cancel deployment request on SF side as well)

      Other than this there are only some places which are constantly polling Salesforce:

      • If you enable logs polling - SF is polled each 10 seconds (this can give up to 8640 requests per 24 hours)
      • If there are test runs that are currently running (and started from TWS) - SF is polled every 30 seconds (if there are hung tests that are "active" for 24 hours this can give additionally 2880 requests per 24 hours, but this is an edge case)
      • If there are no test runs active but tests panel is displayed - SF is polled each 60 seconds for Test Queue updates (this gives additionally 1440 requests per 24 hours)

      This items in total may get you very close to 15k value, but don't think that it's your case.


      Regarding the Apex Class you've mentioned:

      • You can't even open it in Salesforce itself now?
      • Previously this class was working and opened as it should?

      We will look into build logic and possible reasons of such API usage asap and will get back yo you as soon as we'll have any updates.


      Thanks,

      Vladimir


      Vladimir Gubanovich
      Head of Product
       
      The Welkin Suite
      skype id: vladimir.gubanovich
      e-mail: vladimir.gubanovich@welkinsuite.com


      #3

      ron.planken

        Posted 22 Apr 2015

        Thank you for the quick response Vladimir. It seems this was an error on my part, I was still using an rather old build of the Welkin Suite on this computer. This build was from before 14th of April and seems to lack the "intelligent" build feature. I think the old version was hung up on the build error from salesforce and kept on trying to build the file which racked up all the Api calls.


        Unfortunately I'm unable to reproduce the error with the Apex class. When I tried to upload the same changes using the Developer Console on salesforce I got the mentioned error. I had to edit the VisualForce page that has the Apex class as a extension, empty the file, do the changes to my Apex class (change the Controller to a SetController), save the Apex class and then reupload the VisualForce file before I was able to continue.


        This error only came up when I tried to switch the constructor of my class from the StandardController to the StandardSetController. When I try to reproduce the same situation everything seems to work. I think this was an error on salesforce.com itself where it was not sure when to build which file first.


        My apologies for submitting an error, I'm now working on the latest version of Welkin with the auto updates enabled.



        #4

        vlgubanovich

          Posted 22 Apr 2015

          Hi Ron,


          No worries for submitting this error - while answering to your post we've found some room for performance improvements in build process and in Logs polling :)


          Thanks,

          Vladimir


          Vladimir Gubanovich
          Head of Product
           
          The Welkin Suite
          skype id: vladimir.gubanovich
          e-mail: vladimir.gubanovich@welkinsuite.com


          Boost Your Productivity. Get Started Today

          Try Free Trial