How to speed up Alarms retrieval

The goal is to get the list of alarms from each camera on a server inside a time interval, say 12 days. We are using methodname=alarms and use the centertime approach and set the appropriate radius. We get the results set for each camera, the command/syntax is not our issue; we notice however that this is very slow. It can take minutes to retrieve the list of alarms for a single camera and hours to get the list of all alarms for all cameras on a single server. We frequently get timeout errors (meaning, we wait for 3 minutes and still get nothing) and then come back an hour later and the same camera will then return its list of alarms. Sometimes this process ends up being very fast too.

My question is why is this process slow and whether there is any guidance on how to speed up such requests? Is checking alarms of the last 12 days too much (according to our testing, doing 1 day gives us the same performance issue)? Is doing multiple cameras at once too much computation on the server (according to our testing, 1 camera at a time gives the same issues as doing 10 cameras at a time).

Any help/tips/pointers would be greatly appreciated!

How many alarms approximately you get on each request?

We notice this issue also when we search for a single alarm inside of the time interval. We notice that it can be quite slow to get any response from the socket and then once there are bytes to read, that can also take some time if the number of alarms is larger.

Do you think this can have anything to do with how the system owners configure the VMS?

Thank you,

Hello Daniel! Just trying to identify the problem:

  • Can you please expose which version are you running?
  • Do you have the same issue when retrieving Alarms using another approach?
  • How often are you calling this request?
  • Do you have any similar issue with other calls?
  • Do you have any other network-related issues?

Many thanks!

Hi Pep,

We have seen this issue on pretty much every Milestone system we run that is not a development instance. Some examples include XProtect Corporate (most of our work is with that version) from years 2017 and on. We’ve also seen this with XProtect professional+.

If there is another approach to retrieving alarms (or recordings in general) that we can use we will be glad to try it. Any documentation for protocol integrations to retrieve recordings that works differently than how I outlined above (center-method) would be appreciated. Note that we tried the different options listed in the documentation about alarms on that same page and the center method is the only one that returned information as we would expect.

Ideally, we would do this at least once an hour (that’s how our service is provided).

We do not have a similar with other calls. We can get images almost instantaneously and can get many images in parallel as well without issue. It’s just for getting these alarms that we see such enormous delays/slow-downs/timeouts.

Based on seeing how quickly we can get images successfully we do not believe it would be a network thing at all (images are a larger payload and we can get them immediately).

Please let me know if you need any additional information or if we can do a phone-call to go into more depth.

Thank you very much!

Hi Daniel! Just wanted to update status on this. We are still working on it, just figuring out where the bottle neck can be or other problems. Hope we can come back to you with more information soon.

Thanks!

In the Image Server protocol, what you get from the method Alarms (“Alarms – Get max N recorded sequences around a point in time” ref. https://doc.developer.milestonesys.com/html/index.html?base=reference/protocols/imageserver_request_response.html&tree=tree_3.html) is actually not alarms as you see them in the Smart Client Alarm Manager workspace and other places. (The Image Server protocol was invented long before Milestone XProtect’s concept of alarms was introduced.)

With this in mind and before going into alternative approaches, we would like to ask what it is you want to get. Is it alarms as seen in Alarm Manager and defined in the Management Client under the Alarms node or is it sequences of recordings as seen in the Timeline as red bars in the Smart Client in playback mode?

Also: Would you be able to use the MIP library (.Net Framework) or must it be protocol methods?

Thank you, I didn’t know that. And no, thanks for confirming, using the .Net framework is not an option for a long list of reasons.

We are looking to have the history of the recordings on a per camera-basis. From our understanding, this would correspond to the information in the smart-client that the user can zoom into and see if they have a recording at a specific time. It seems to us that’s what this command is referring to, is that right?

Please use Recorder Command Service instead of ImageServer protocol please see this link -

https://doc.developer.milestonesys.com/html/index.html?base=recordersoaphelp/index.html&tree=tree_3.html

You will see “Retrieve list of sequences with time/dates for recordings” and we assume this is what you might want to do.

Thank you, Rie!

We implemented this and ran it against a few servers and always get the same error:

soap:ServerSequences Get not allowed40000

Is there a specific permission that needs to be enabled for us to run this? Currently we already have users enable live, browse, sequences, and smartsearch.

Thank you!

Can you please test with a user in an administrator role?