SambaPOS v5.1.6 very Sluggish

I’ve got a machine running SambaPOS v5.1.6 and it gets slow randomly.

You click something, and it will not respond for a good few seconds. This happens both on the POS screen and the admin section. This is happening even while using the server directly.
Both SambaPOS & SQL server are installed on the same machine, so we can definitely eliminate network dependency.
Power management settings are not an issue as it is happening on the fly… The system will be normal, quick to respond for 30-40 seconds, and then randomly my next click/tap will have a 3-5 second delay. The delays are long enough sometimes to bring in the windows dialogue ‘SambaPOS has stopped responding’ and soon after it responds.

Im running Intel Xeon 3.10GHz, 8.00GB RAM,
Windows 10 64 Bit.

Any explanations to what may be causing it?
Is there a log in SambaPOS that i could check to debug this issue?

I’ve experienced similar issues, except more on wireless tablet side than the main POS/Server side. I brought it down to nature of wireless. Though in saying that, I’ve experience far more delays windows 10 server side than on windows 7.

So you think its got something to do with the OS?

That doesnt sound very comforting. The last thing i would want to do is switch my OS on a live working system.

i know network is not the issue as im using it directly on the server terminal, everything on the same machine, which would mean without network also the system is 100% functional.

There’s a possibility. But it’s only a possibility. Your CPU and RAM is good and fast enough to run without problems. Are you using an SSD hard drive or standard spindle styles?

I’d also check task manager to see what processes are running in the background, see what the CPU usage of the programs running are to get an idea if something is chewing on the processing speed.

There’s no need to switch to a different OS, we can try and break it down to what could possibly causing the issue.

So I’m guessing you’re only running 1 Till on your shop correct?

yes only 1 terminal at the moment.

Im working on a few web services to integrate with a website, but im a bit scared seeing how it randomly freezes.
While testing already i found myself in a position where some of my calls were just stuck for a long time until response. That will cost me with my online orders because if the customer sees the loader spinning for 30 seconds while placing an order, they will move on

If you have a spare pc/laptop or windows device, you could try installing your database and samba onto their, test to see if it’s acting the same way, if it’s not, it will at least give an idea that something on your till is causing the delay, if it is, then we can break it down to something either to do with SQL or worst case, samba.

Yeah i tested on 3 machines so far, and same thing everywhere.
So im suspecting something with the SambaPOS core.

For testing and development im using a test machine that has the same setup as the main server.
Slightly less powerful processor, everything else same.

SambaPOS 1.60 is running fine in thousands of shops. We need to narrow this down more. you mentioned your running calls… what scripts are you running? and when? What custom setup do you have?

If you can pm a backup of your database to me I can take a look and run some diagnostics.

I am running windows 10 and the latest 1.6 release in production… no issues at all on slowdown and I have some complex configuration.

Can you share when its happening? Can you spot a pattern?

Can you share that script so we know what is going on? Also share with us when your triggering it and how.

Hmm for a second I was thinking maybe autoing a forced refresh every 5-10 second to see if that makes a difference.

There are several reasons for slowdown that I have seen reported… very few if ever have been SambaPOS related… most of the time with v5 its been related to custom scripts or using report tags for State Display excessively and not understanding how it loads to memory etc.

If it truly was SambaPOS core issue others would experience it more often… but maybe its specific to your setup? Providing us a sample database to look at could help discover something. @emre would certainly require that.

Common script configuration mistakes can cause freezes as well. Like forgetting to fill out handler portion of script and saving it. I mean we are talking about very custom setup here expecially if your running scripts. It could be anything causing slowdown… SambaPOS core likely isnt it but who knows.

Do you have script debugger enabled? Do you have Rule debugger running? Be sure and disable both of those.

By Scripts i mean the GQL queries. The javascript API recently added to SambaPOS.
Sometimes my calls take way to long to respond. Unfortunately i dont seem to find a pattern on these sluggish breaks.
Sometimes it will happen while on the POS screen, or just click a menu option from the Main Admin screen.

Debuggers are off.

Im basically using the Custom Package Delivery for v5 following this:

A few additional tweaks to suit our purpose and that’s about it.
Sure i cam PM my DB to @emre.

Im hoping someone else faced this situation and has a solution so i dont have to bother emre again.

Turn off windows defender. One of my clients systems was very sluggish because defender was taking up too much cpu

Edit… I’m not saying it’ll fix your problem but it might help.

1 Like

Ok. Windows defender makes sense…

Another thing i found out was in my Windows Event Viewer, The SQL server is starting up the database pretty much all the time…every 10-15 minutes there is a log for SQL server starting a DB. is that normal ?

I checked your database. You added 1 second refresh to Ticket Lister in delivery screen. That is too much. Either increase it to 30 seconds or setup message server to auto refresh when tickets creates.


applications I think it was, then windows defender

Click Turn Off Windows Defender.

Check ENABLE, apply and OK

Thanks Emre for looking into my DB.

I found out one tiny setting causing a major issue. The SQL server was Auto-Closing the DB, and forcing a new load everytime a query was made. Fixed that in the DB properties in SQL express, and the sluggishness seems to be gone.
Dont know why SQL Server Express decided to make that the default setting.


Please show a screenshot of that setting so others might check for and correct that issue.