6 Replies Latest reply on Aug 9, 2017 1:00 PM by mfoerster

    RemoveSignups of a Deleted PiPoint

    AlexRakia

      Hello,

       

      I have a group of 10 PiPoints that I'm monitoring their snapshots, using PIDataPipe(AFDataPipeType.Snapshot)  with PIDataPipe.AddSignups.

      Looking at PIDataPipe.ListSignUpsByServer I see 10 elements. - as expected.

      Then the user deletes one PIPoint named (A) using the SMT.

      I also notice that the pipe stops bringing values for this PiPoint named (A), which is fine.  - as expected.

       

      Looking at PIDataPipe.ListSignUpsByServer I still see 10 elements. (So the PIPE SignUp remained)

       

      How can I remove the SignUp of this deleted PiPont named (A) from the PIDataPipe?  

      Since it is a non-existing PIPoint and I only have it's name available.

       

      Thanks

        • Re: RemoveSignups of a Deleted PiPoint
          messingerj

          Hi Alex,

           

          Short of restarting the PI Update Manager subsystem, you can't manually remove this signup. The Update Manager automatically cleans up orphaned or lost signups after a short period of time. With the point deleted, the update producer (presumably the snapshot subsystem) will no longer be sending updates to the queue, and the consumer that created the signup will not be retrieving anything, so I would expect this signup to eventually become classed as 'lost' and then cleaned up.

           

          John

          1 of 1 people found this helpful
            • Re: RemoveSignups of a Deleted PiPoint
              AlexRakia

              Hi John,

               

              Restarting the PI Update Manager subsystem is not an option in my customer's Production system.

               

              Thanks for this remark: "Update Manager automatically cleans up orphaned or lost signups after a short period of time"

              1. Do you know where is this "short period of timeConfigured   or   is it a known hardcoded time period?

               

              2. Does the  "Update Manager" update or trigger something in the system, that I can monitor to see that it "cleaned the orphaned signups" ?

               

              3. What I was expecting from OSI-Soft is to give us the option in the AFSDK to request a "PIPE Refresh" from the "Update Manager" so that we know that all it's pipes are good ones and all the "orphaned SignUps".

               

              Thanks

                • Re: RemoveSignups of a Deleted PiPoint
                  messingerj

                  Hi Alex,

                   

                  Timeout periods such as mentioned are typically configured via PI Tuning Parameters. Looking through the parameters for the Update Manager, I believe that Update_PersistentConsumerTimeout is the parameter that would likely come into play here. On my test system, this default value for this parameter is 86400 seconds. So I would have expected that point signup to be removed no more than a day after it became inactive. Observations on my own test system (for an unrelated purpose, but with a similar scenario) showed that inactive signups were removed much sooner than that (< 1 hour). Unfortunately I don't know the internals of this subsystem as well as I once did, but I'd be surprised if the orphaned point signup persists beyond a day.

                   

                  You mentioned that you are monitoring the snapshots of these points with some custom code. Is this application the same one that created the datapipe with these signups in the first place? Are you able to restart this application? Doing so should clean up the signups, as PIDataPipe implements IDisposable (assuming you created the datapipe in a using block), and this should properly close any subscriptions with the Update Manager.

                   

                  "Does the  "Update Manager" update or trigger something in the system, that I can monitor to see that it "cleaned the orphaned signups" ?" - I don't think so, at least not that I have seen.

                  1 of 1 people found this helpful
              • Re: RemoveSignups of a Deleted PiPoint
                AlexRakia

                Thank you John for the elaboration on this matter.

                 

                My Customer's system is actually a big one, and may things that I can do on my DEV system, I can't do at the customer site (like restarts, of all sorts).

                 

                So I understand I have to live with the Orphaned EventPipe's SignUps of any deleted point, until the PI Server cleans it away.

                 

                Is there is any limitation on the number of EventPipes (SignUps) that one client process can open against the PiPoints on the server? (regardless if Active ones or orphaned ones altogether)

                • Re: RemoveSignups of a Deleted PiPoint
                  mfoerster

                  Hello Alex,

                   

                  I understand that the Signup-List that you are referring to is not the PI Update Manager Signup list. It is the Signup-List of the PIDataPipe.

                  Therefore you can remove signups with the PIDataPipe.RemoveSignups Method.

                   

                  Visual Basic:

                   

                  Dim instance As PIDataPipe

                  Dim pointList As IList(Of PIPoint)

                  Dim returnValue As AFErrors(Of PIPoint)

                   

                  returnValue = instance.RemoveSignups(pointList)

                   

                  Kind regards,

                  Moritz

                  1 of 1 people found this helpful