cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

ThingWorx SetRemotePropertyBinding Runtime?

JK_10744682
9-Granite

ThingWorx SetRemotePropertyBinding Runtime?

Does anyone know the runtime for the SetRemotePropertyBinding service in ThingWorx and if calling it a lot of times in a single service to automatically bind many properties will cause slow runtime or timeout issues? My team is trying to bind between 1000-2000 properties for a machine in a single service call and the service takes incredibly long to run, sometimes will reach the 20-minute service timeout limit, and I am trying to rule out if this service could cause that issue if ran a lot. Thanks!

 

Version 9.3.17

ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

It must be the thing restart, which is slow. Try to export your thing as XML, "rebind" the properties in the file, and import it back -- this way you may avoid multiple costly restarts.

 

/ Constantine

View solution in original post

17 REPLIES 17

Hi @JK_10744682 ,

The only way to approach this in order to know with certainty where the time is spent, is to time the execution of the service sections in the loop. You can create a big string or JSON where you log all the execution times of the different parts of the service, then analyze it after it finishes execution to find out what takes the most.

Please let us know the outcome of this analysis

After some analysis, the SetRemotePropertyBinding service is what is taking so long. The average time for each service call to SetRemotePropertyBinding was 1707.69 MS. Which explains why my service is timing out. But is there any way to speed up this service so that I can call it 1000-2000 times and not time out? It is a built-in service so I don't know exactly what can be done to speed this up. 

Another update. On some of the things I am trying to call my binding service on I average ~200 ms per SetRemotePropertyBinding, while other things take much more (~1700 ms like mentioned before). The configuration for the things seems to be the same, but is there any factor that could slow down the built in SetRemotePropertyBinding service? 

JaredBird
4-Participant
(To:JK_10744682)

Try removing the IndustrialThing to cause the Thing to be disconnected, then run the setRemotePropertyBinding Service, then reconnect the IndustrialThing.  The setRemotePropertyBinding service should run much faster when the Thing is disconnected.

Is there a way to disconnect the IndustrialThing without removing/deleting it out? We call this re-bind service somewhat often when new kepware tags are added so I'd like if we didn't have to constantly delete and re-add the thing

JaredBird
4-Participant
(To:JK_10744682)

You might be able to run the DisableThing Service, then set your bindings, then re-enable thing, but I'm not sure if you can set your bindings when it's disabled or not.  Other than that, I don't see any way that it can be done without removing the IndustrialThing value.

Tried using the disable service but can't bind when the thing is disabled unfortunately so will have to test other options i think 

 

Do you have any ideas what might cause some Remote Things to bind slowly but some to bind very quickly? Stumped because some of them are very fast and have no issue but others take significantly longer to bind.

@JK_10744682  SetRemotePropertyBinding service needs save and restart the thing to completely save the new binding.

A thing with over 2000 remote bindings is normally heavy and takes long time for restart. Sometimes remote thing could go disconnected and remote properties stop refreshing if something went wrong during the restart.

 

We do not suggest to bind too many remote properties for one remote thing. 

If you control the remote bindings for example within 100, it may go safer and smoother. I can not give a limit as it depends on many factors, like server spec(memory), count of remote things, data update frequency.

Is it possible to split remote properties into multiple things? 

Splitting up the thing into multiple things doesn't really make sense since this is all properties for one single machine and would just add more confusion and disorganization. Deleting the thing out and recreating it seemed to work, but isn't a good long-term solution since we would be deleting and recreating things anytime we want to add new property bindings which is fairly often. 

JaredBird
4-Participant
(To:JK_10744682)

My suggestion wasn't to actually delete the Thing, it was just to remove the value from the property called "IndustrialThing" that is necessary to connect it to Kepware.  You don't need to delete the Thing completely, just remove the propertly value, create your bindings, then put your property value back to what it was originally.

Oh I misunderstood. I will give this a try.

Hi @JK_10744682 ,

It appears that a response may answer your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate the proper one as the Accepted Solution.

In the event that a response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,

wcui

Have you tried AddPropertyDefinitions service? It can add multiple properties by one call.

I haven't tried this but don't think it would work since I am just re-binding my existing properties that are on shapes on the thing but this service seems to create entire properties

Hello,

 

It must be the thing restart, which is slow. Try to export your thing as XML, "rebind" the properties in the file, and import it back -- this way you may avoid multiple costly restarts.

 

/ Constantine

I would suggest trying this manually once, and if you confirm that it works faster than before, then you can automate it quite easily with a combination of SourceControlFunctions and ContentLoader resources.

Announcements


Top Tags