SambaPOS really slow, hangs and CPU usage 99%

Hello everybody,

Just to share my experience with you, my problem is solved.

Windows 10/1709/all upadtes, etc … disabled
SambaPOS V5 (5.2.20)
Ms SQL server 2017
1 server + 3 RDP from tablets

For the last year SambaPOS has been a nightmare for me:
From time to time (2 or 3 times a day) It hanged, it was soooo slow, consuming all my CPU, even the task manager stopped responding.

I thought Windows 10 was guilty and had no time to reinstall everything.
about 2 weeks ago I found that post:
SambaPOS v5.1.6 very Sluggish

Without any conviction I did the suggestion

autoclose OFF

and since then … SambaPOS is lightening fast and is running like a charm for the last 2 weeks.
:smiley::smiley::smiley:

For the people who would not have the extra big Ms SQLserver tool to manage their database (like me), they can send that command line:

SQLCMD.EXE -h -1 -d SambaPOS5 -Q "SELECT DATABASEPROPERTY('SambaPOS5','IsAutoClose');"

to see the status of autoclose

SQLCMD.EXE -h -1 -d SambaPOS5 -Q "ALTER DATABASE [SambaPOS5] SET AUTO_CLOSE OFF;"

To set it to OFF.

6 Likes

I’m gonna do this too and report back.
Edit: I don’t see any noticeable difference yet.

1 Like

https://docs.microsoft.com/en-us/sql/relational-databases/policy-based-management/set-the-auto-close-database-option-to-off?view=sql-server-2017

SambaPOS5 database might be installed with autoclose=off by default.
It depends on when you did the database installation.
Some builds came with autoclose=on due to emre’s framework at that time.

So check if your database has been installed with autoclose=on first to see if it applies to you or not.

It was set to “True” before.

Ok, if you don’t feel any difference it’s that your system is well build.
Mine not,
I have 3 rdp on tablet through wireless which gives really poor network performance and disabling the autoclose helped a lot :slight_smile:

1 Like

Yes you will mostly see better performance with rdp. Regular terminals won’t notice much at all

I am just curious what exactly is the purpose of that AUTO_CLOSE OFF?

It keeps the database alive. This really only helps with rdp. His title confuses this. It should read slow or hangs when using rdp over a network via WiFi.