6 Replies Latest reply on Mar 17, 2016 5:15 PM by Arpit Branched to a new discussion.

    PI Web API - High memory usage

    Arpit

      Hi All,

       

      I have installed PI Web API 2015 R3 on Windows 2008 R2 Standard server and i am using BATCH api to GET the data from PI points.
      It was working okay for few days, but now when i try to access the PI Web API using URL (https://server/piwebapi) it just keeps on loading and does not give any response.
      Even on restarting PI web Api service, it does not completely resolves the issue, it just works fine for some time and after that it keeps loading.

       

      Also, i have noticed that PI Web api is using very high amount of memory(EDIT: More than 7GB) which is slowing down the whole system.

       

      Please help resolving this issue.

       

      Thanks in advance!

        • Re: PI Web API - High memory usage
          bshang

          What is the starting/ending memory and what is the rate (MB/hour) of memory growth? What kind of calls are you making (i.e. what are the target endpoints)? Can you share a sample REST call? What is the frequency of the calls and how much data do they return? Are you using Anonymous/Basic/Kerberos for authentication? Why are you making batch calls instead of directly making a GET request? FYI, the high memory could be related to PI Web API's usage of AF SDK which is why the above questions are relevant.

          • Re: PI Web API - High memory usage
            pthivierge

            Hello Arpit,

             

            On top of what Barry is asking, it will be useful to have an estimation of how many tags are getting queried.  I would suspect the AF SDK cache to be responsible of consuming this amount of memory.  And this would occur only if you have a high number of different tags that are getting queried.

             

            I would probably consider adding more memory to this server or to move the PI Web API to bigger hardware with especially more memory.  If this is not an option, you might want to revisit how you application is consuming API data.  Maybe its querying big time ranges over and over? maybe you could add a mechanism in your application so after the first data call, you query only the missing time periods?

             

            There is a lot of guessing here and the more information you provide the better we can help