Intermittent System Lag since Upgrading to Windows 11 Pro / SambaPOS 5.5.8

SQL Server 2017
Windows 11 Pro

SambaPOS hangs and lags and asks to wait or be closed since moving to Windows 11 Pro.

Is there anything I could check that could be causing this slowdown?

What’s the specifications of your computer?

Optiplex 3080
i3 3GHZ
8GB RAM
256GB SSD
WINDOWS 11 PRO 64 BIT

I had no issues on Windows 10 with this hardware but since moving to Windows 11 pro we are getting this lag very often to a point where it is unusable…

Before I was using internet explorer for my customer display in Windows 10 now I am using Edge, this does seems to be using alot more resources. However when I disable my customer display I am still getting the lag.

What version of Sambapos? And did you install latest .net 4.8?

SambaPOS 5.5.8

.NET is 4.5

Is 4.8 required?

Update:

In remove programs it says 4.5 but when I downloaded and tried to install 4.8 it said I already had 4.8

Hi

I believe the recent update to 5.5.8 has caused some sort of problems with my drinks display. I am curious to find out what was changed in 5.5.8 that may have caused these crashing issues?

It got so bad that I have now abandoned my drinks display setup and gone back to hard copy printing.

First show the crash so we can understand. We are changing and updating a lot of things it’s hard to understand without seeing the crash.

We’ll need some more info:

  • what are you attempting to do when the freeze/crash happens?
  • drinks display: is this a custom entity screen or are you using images on the menu buttons, or something else?
  • anything in the log file or event viewer at the time of the freeze/crash?

Also please specify if you are using SambaPos on same machine where the SQL Express server is running.

If on different machine, then check/update your wireless card driver or network card driver, even try with a wired connection if your were using WiFi to rule out possible sources of the issue.

1 Like

Hi All

Thank your responses to help however due to it being a live system, I had to take this feature out for now and currently decided to stick with the traditional printing for the drinks rather than a display system.

Please post the logs when you get a chance. It is probably message server related. Also you can try our new android/iOS kds system.

Also when you have the time please clarify what exactly are you referring to? is it Customer Display? Kitchen/Drinks Display? has reverting to “traditional printing” solved the crashing issue?

@dgtalent

I had setup a Drinks display as per this article:

https://kb.sambapos.com/en/4-32-how-to-separate-food-and-drinks-on-kitchen-display/

To be honest it never ran as smoothly as hard copy printing, and it was not crashing but lagging as per my original post.

Since the upgrades it become even more laggy.
However I have now removed all the settings for this and cant re-create the issue any longer as I have also got rid of the tablet I was using for the drinks display.

In regards to the message server it was connected correctly via port 9000.

So it seems you’re using Tasks. I’m wondering if there are a lot of tasks that haven’t been cleared that are causing the refresh to lag on updates.

In SSMS, run this query:

SELECT * FROM dbo.Tasks

Is the count returned very high?

1 Like

@Memo

Yes you are spot on.

The query returned nearly 100,000 results.

So this must be the reason why it was lagging so badly.

That’s the reason.

SambaPOS was built before SQL Server had JSON support and at the dawn of primitive JSON libraries for .NET Framework.

So when SambaPOS is searching for an entity field or, in this case, the CustomData in the task, it performs a full-text search of that column meaning EVERY row must be checked to see if it matches the search criteria. So every refresh of your entity screen must scan 100k+ rows for a match.

You’ll want to delete the old tasks - there’s a column EndDate you can use to constrain your DML in case you’re running it when open.

Going forward, I’m not sure if one can automatically delete tasks that are no longer needed. I would assume so, but I haven’t worked with them. I’d look into that.

Otherwise, you could have a script that is executed when closing the work period that clears that table. I’m not sure if the work period closed event waits on the auto backup, though. So you may have to have the rule fire before work period ends. It’s the end of the day so if you lose those tasks I don’t think it’d be a big issue if you had to restore and didn’t have that information.

3 Likes

@Memo

Excellent explanation however please elaborate on:

“there’s a column EndDate you can use to constrain your DML in case you’re running it when open.”

I have truncated the dbo.Tasks table which has reduced my database size. As you say I could easily run a script to clear this table.

What is the EndDate column for, do these tasks auto clear after a certain period of time?

Mine probably didn’t clear Food order because I was only using it as a Drinks display and should have configured the printer job to print drinks only rather than both.

Thanks to you we now understand why we was having this lagging problems.

The tasks table has a column EndDate. I was suggesting that if you wanted to clear the table whilst a restaurant was open and didn’t want to accidentally delete tasks for the current shift, you could use that column in a WHERE clause.