3 Replies Latest reply on Aug 19, 2015 3:31 PM by bshang

    Hosting PI Web API in IIS


      I am currently working on a major project for our company where we will use PI Web API (v 1.5.x) to crawl AF elements hierarchy and then download data from many location in the world.


      That said, the main issue so far is that for some reason PI Web API 2015 service will stop by itself,


      When I look in event viewer on the remote server there is nothing under PIWebAPI\Admin but in Windows Logs\Application I can see something like this :


      Faulting application name: OSIsoft.REST.Host.exe, version:, time stamp: 0x54d299cd

      Faulting module name: clr.dll, version:, time stamp: 0x5584e818

      Exception code: 0xc00000fd

      Fault offset: 0x00000000000091a8

      Faulting process id: 0x1110

      Faulting application start time: 0x01d0d5f703c369d7

      Faulting application path: D:\Program Files\PIPC\WebAPI\OSIsoft.REST.Host.exe

      Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll

      Report Id: 316e613a-45e0-11e5-bb5d-005056ab745e


      I understand that the service get an unhandled error (happen) and stop (not good).


      EDIT : To add on the actual exception, I did a DebugDiag with the dump file and found this as the most usefull information:

      In OSIsoft.REST.Host.exe.2108.dmp the assembly instruction at System_Runtime_Serialization_ni+a342f in C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Runteb92aa12#\10ac1ee8f5a49497e507e508ff64e21f\System.Runtime.Serialization.ni.dll from Microsoft Corporation has caused a stack overflow exception (0xC00000FD) when trying to write to memory location 0x00000001 on thread 20


      My true question here: Is it possible to host PIWebAPI under IIS instead of self hosting in a service ?




      Ce message a été modifié par : Sebastien Chandonnet

        • Re: Hosting PI Web API in IIS

          Hi Sebastien,


          There are no current plans to run PI Web API within IIS. Why would you like to host PI Web API under IIS?


          Can you give us some additional information to help troubleshoot the issue?

          • How often does PI Web API stop?
          • What are the events leading up to the crash?
          • Can you send us the Event Viewer logs as well as the crash dump? (We can open a Tech Support case for you to troubleshoot the issue.)
            • Re: Hosting PI Web API in IIS

              Because we already have IIS configured and optimized on the same server and also when a request crash on a unhandled error it will continue to run.


              The problem will occur everytime for some of our sites when we start hammering the piwebapi service with requests like 'PlotValue', 'Value' after few succesfull it just stop.


              In my original post you have the eventviewer entry regarding the issue and the information I can find from the dump file using DebugDiag.


              Unfortunatly I am out of time to help you troubleshoot more on that. My prority is on a lot of things more important for my company so I will just switch to a different technology. (by the way the dump file in 600 megabytes located at Portland Australia ... our WAN is so slow that it will take a full day to transfer with 80% chance to fail).