Aurelius with SQLite

People using the SQLite database with Aurelius I am receiving “database is locked”
As I understand it is more or less a matter of trying several simultaneous operations.
Does anyone have any tips on a good way to work with sqlite and avoid this?

SQLite is not designed to have high concurrency - many users accessing the database at the same time. Are you doing that? What is your application setup and architecture regarding SQLite?

1 Like

This is a restaurant application similar to the mac donalds ordering screen.

Our application uses Echo + Aurelius + SQLite in the client environment with Android and Firebird on the Server side.

This problem is occurring in the Mobile environment and does not have multiple client applications connecting to the same bank.

But we have threads making queries in this sqlite database, because there are many queries to be made.

Are you using the native SQLite driver, or are you using FireDAC?
Is there a chance that you are opening transactions in threads and not committing then, or leaving connections open?

1 Like

I am using native driver, and better to use with firedac?

I'll check to see if there are any open connections.

Is it okay to use it this way?

You have a global connection - which is ok - and you have a global object manager - which is not ok at all. You should not use a global object manager.
It's even worse if you have multiple threads using the same object manager. Is it the case?

1 Like

Is a global connection indicated for sqlite or for any bank?

Yes, if you use the connection from the same thread. If you have several threads accessing the database, it's recommended to have one connection for each thread, or in case of SQLite, serialize (synchronize) the access to the connection.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.