Ignition Client hangs intermittently

What are the possible reasons that cause ignition client to hang (have already checked that the CPU and Memory utilisations are acceptable)?
Will the .ignition cache build up over time cause the client to hang?
What are the ways to go about troubleshooting this?

That usually means you are running long scripts on the UI thread (component & window events, runScript bindings, etc). Especially when performing DB operations, and scripted tag or opc operations. There is much in the Ignition scripting library that shouldn’t be used in the most common event and script locations. (Though it is generally acceptable in the actionPerformed event of a button–users typically expect a pause there.)

Along the same lines as @pturmel, If you’ve used any calls to system.alarm.queryStatus in your Windows, get rid of them, they are terrible for GUI performance. This is used in the template that IA provides… :grimacing:

Years ago I had 5-10 of these used on a page to summarise the alarms within an alarm display template and GUI performance was almost unusable. I learnt my lesson the hard way

2 Likes

Even in an asynchronous thread?

Running async won’t affect the GUI, no, but then you’re running this per client and potentially multiple times per client depending on how you’re utilising the calls, which will increase load unnecessarily on the gateway CPU. You also need to get it back to your client somehow as well. I call this function once periodically in a tag expression which writes the results into a script library list of dictionaries, then i can filter on that dictionary to get a summary of alarms based on area wherever I need it

Any suggestion on how we can go about troubleshooting which script is causing the hang?
Will clearing the .ignition cache help to prevent the hang?

Extremely unlikely.

I would audit every script in or called from components to look for system.alarm|tag|opc|db.* in the foreground thread. Unfortunately, there's no way to instrument those calls directly.

thanks for ur advice. what do u mean by there’s no way to instrument those calls directly?

In a pure python environment, or other languages, one can “monkey-patch” a module so calls to system.tag.something call something else first. Or even something else before and after. This isn’t available for Ignition’s system functions.

Another issue we faced is the whole window PC will hang while ignition client is launched on the PC. Is there any way we can go about troubleshooting this? There are no errors found in the logs or the windows event viewer.

Yes, but is hard to answer. This is likely due to a large load of unoptimized scripts. No errors in logs because the problem is the script semantics and not the script syntaxis.
But I'm just guessing.