• Welcome, Guest. Please login.
 
July 10, 2020, 12:11:37 am

News:

Welcome to the SQLitening support forums!


Stress Testing

Started by D. Wilson, October 12, 2008, 04:34:47 am

Previous topic - Next topic

D. Wilson

Has anyone stress tested the server?  How many users do you feel is a safe upper limit? I know there is a lot of variables. But I am looking at using the server in a couple of projects and would like to learn from the experiences other have had.

mikedoty

October 12, 2008, 09:52:48 am #1 Last Edit: October 12, 2008, 09:54:27 am by mikedoty
It is possible to lock the server if a transaction doesn't complete.
I did this some time back and had to reboot the server and run vacuum.
If stress testing, please disconnect without ending a transaction to
see if this can be duplicated.  This is the only error I've seen, but I
haven't stress tested, yet.  Also, if using VB6 it was pretty easy to
crash the VB6 environment on close.  I got around this by doing all the
calls from a loaded PowerBASIC DLL.  I still think there is something wrong
closing with VB6.

mikedoty

Did I mention start transactions with "BEGIN IMMEDIATE" to solve conflicts?

D. Wilson

So by using the START IMMEDIATE that has eliminated the error. How many users are accessing the database at the same time ??

mikedoty

October 17, 2008, 08:22:49 pm #4 Last Edit: October 17, 2008, 08:24:49 pm by Mike
Just me, but 50 simultaneous times over the internet and haven't been able to crash it.
To lock it up you might just send Begin statements.

Paul Squires

Using BEGIN IMMEDIATE will ensure that you get exclusive read/write access thereby no deadlocks could happen.

Number of users? I wouldn't be too concerned unless you're dealing with thousands of users attempting write to the database at the EXACT same time. SQLite has a very good, progressive, locking scheme whereby readers and writers are eventually starved until the transaction gets exclusive access. Most database accesses/write take milliseconds so the database is really only locked briefly by any one user at any one time. Couple with the fact that SQLitening uses multiple threads to handle connections and retries busy conditions until it timeouts, and you have a pretty robust system.

The above is based on all the reading I have done about SQLite from the book, the website, and the on-line mailing list.

So, how many users will your application have? My next application will only have a license for 1 to 10 users so SQLite will handle that perfectly.

jonas

can I get that stress testing so I can see how you did it, I try to run the same .exe 20 times and it fails once in a while, so I want to see how will be the best way.

Thanks.