AnsweredAssumed Answered

Best way to query multiple values by path in one call / client running out of sockets

Question asked by eignert on Jul 13, 2018
Latest reply on Jul 13, 2018 by vkaufmann

Hi everyone,

we have a pretty strange situation when using the PI WebApi to retrieve data directly from the PI Data Archive..

An application which knows the path (format \\archiveserver\pointname) is firstly resolving this path to a WebId and then using the Streams-Controller to get the value of the point. This means I need two calls to retrieve one value for a PI Point.
The affected application does this for a whole bunch of points utilizing RestSharp. In certain situations the calls will fail with an exception somewhere in the namespace of Systen.Net.Sockets (HttpWebRequest):

Only one usage of each socket address (protocol/network address/port) is normally permitted

As far as I could find out this means that there are no more sockets available on the client. We've already tried increasing the dynamic port range but the error still appears. Because of this we would now want to decrease the number of calls to the PI WebApi so that we can get around this issue.


The question that we are now facing is: What is the best way to retrieve archive values, interpolated values and current values for multiple tags that are identified by the path syntax in one call? I suppose that we should use the Batch controller or is there any other way?
And by the way it would be really interesting for me if someone ever faced the same problems with running out of sockets... Microsoft support seems to not really be interested on working on issues like this...