2 Replies Latest reply on May 20, 2015 12:42 PM by dng

    How is PI resources allocated to the PIWEBAPI


      When the WEBAPI is exposed to a large organisation, how does it protect it-self from bringing the PI database to it knees in very large queries? Is there some build in paging or can you some how control the size of results returned?

      In other words, how does PI mange resources from request. In RDBMS such as Oracle, you can limit the individual user's resources to some %. Is that also possible in PI?

        • Re: How is PI resources allocated to the PIWEBAPI

          Hello Lars,


          PI WEB API has a parameter called Rate Limit.  You can find the full explanation in the PI Web API Documentation here.


          Other than that, for very big queries, there is a timeout for the connection between the PI Web API Service and the PI Server that will stop the data exchange after a specified amount of time.

          You can follow the SDK Timeout section of this KB to learn how to do that: 2960OSI8 - How to modify the PI API and SDK timeout settings


          Let us know if you have more questions

          1 of 1 people found this helpful
          • Re: How is PI resources allocated to the PIWEBAPI

            Hi Lars,


            In addition to client-side parameters as Patrice mentioned, you can often set the MaxCount parameter in the query string at the request level (e.g. when getting recorded values from streams) to limit the number of items returned.

            On the server side, PI Data Archive also has tuning parameters to limit expensive queries from clients (e.g. ArcMaxCollect, etc.). For a list of parameters and their descriptions, you can refer to KB 3224OSI8. These are not limited to PI Web API, but serve as a general fail-safe to protect the PI Data Archive from very expensive queries.

            1 of 1 people found this helpful