MES "Start Production Activity" and such take nearly a minute

We are seeing delays of around a minute in MES when clicking “Start Production Activity” (until the dialog comes up) and also things such as, if “Cancel” is immediately clicked, or after clicking “Ok” for “End Activity”.

I ran tracing and found that the delay in “Start Production Activity” was almost entirely due to Labor.GetByID, which is taking 55.5 seconds to run! If I immediately click “Cancel”, Labor.GetRows is taking 56.0 seconds to run. This is approximately equal to how long it takes to run without tracing. The trace log returned contains over 3,000,000 lines of XML, most of which are LaborDtl records in GetByID and GetRows. If I run SELECT * FROM LaborDtl WHERE EmployeeNum=<myid> against the database (MS-SQL) it takes around 0.6 seconds and returns 2810 rows of 132 columns each.

There are no BPMs on either of these methods, nor are there any data directives for any labor table. What could be taking long and how can this be sped up? My initial suspicion when seeing the size of the 140MB log file was that it was taking a long time to serialize and send the data between the server and the client; still, it only took about 2 seconds to transfer the log file to a faster machine for closer analysis, and of course the database query taking less than 1 second didn’t seem to suggest the database was a problem.

Are you making sure they clock out each day? If they stay clocked in and never clock out, it get’s all of the records for that labor head they are working with. Make sure they clock out at the end of the day.

1 Like

Wow that would do it then! Fortunately I was able to check for this specific user by clocking them out and the back in, but is there a way to check if they are clocked out in an automated way so we can watch for users who do this and (for example, nightly) send an e-mail to remind them to clock out?

You can easily make a dashboard for this. look at any active labor head records that are older than today.

If you wanted to automate an e-mail, you could make a UBAQ and then schedule it with an export BAQ process.

2 Likes