Problem with data point scripting
-
It looks like you probably didn't have the ampersand between the URL parameters. So, you went to
http://host:port/rest/v1/threads?asFile=true stackDepth=40
most likely in your browser, when you should have gone tohttp://host:port/rest/v1/threads?asFile=true&stackDepth=40
It would have downloaded a json file.Also, you can place exceptions or logs between three backtick marks, `, to get formatted sections like the following, which are particularly good for stack traces and logs.
Your output here!
-
@phildunlap now I have the file json but is very big to post in the forum.
I can load the old project and can see that the CPU up when I enable data source MQTT client. Is pobably that some upgrate is the cause?
* -
The three backticks will handle long blocks of text nicely! You can also upload the file using the buttons above the post composition window or email the file to support@infiniteautomation.com
The MQTT data source has not been updated in some time (aside from making the JSON import slightly easier), so no update to that would have caused a change there. It is possible that data source is doing a lot of work. Without looking at the thread dump I can't say what thread is consuming the time.
-
@phildunlap ok, I sent the e-mail. Thank you
-
None of the threads in the dump you sent in seem responsible for a high CPU usage, as none of them have much usage time. So, I would wonder: have you allocated memory explicitly to this instance using an ext-enabled script? Do you have the internal data source recording your available memory? Can you share a chart of that?
Or perhaps I'd wonder, was the system experiencing the issue when you took the thread dump?
-
Hello @phildunlap
I don't have any data source recording my available memory, but in the file that you check the CPU was normal, Now I can get a new file with higt CPU. I sent this file to that you have better tool of diagnostic.
I have this image that show consuption of resource of plataform.
-
The longest running thread in the second dump was a scripting data source executing after being informed by a point update event. Might you have an infinite loop of events? This can happen, for instance, if two meta points (or scripting data sources) had each other in context. Then each time one updates, the other updates, in a circle.
That thread had not been running very long though. Definitely I can say nothing is stuck.
-
@phildunlap Thank you very much.
I'm going to check my data point to see as I can solution the problem.
-
The solution was delete and create a data source MQTT client new.
-
Thanks for sharing the resolution!