oatpp-sqlite icon indicating copy to clipboard operation
oatpp-sqlite copied to clipboard

database is locked

Open kekxv opened this issue 1 year ago • 2 comments

how fix database is locked when run ASYNC?

kekxv avatar Apr 15 '24 02:04 kekxv

Hello @kekxv ,

Most probably you are getting database is locked error when trying to read/write DB from multiple threads simultaneously.

To fix that just set you DB connection pool to max 1 connection

lganzzzo avatar Apr 16 '24 20:04 lganzzzo

@lganzzzo thank you for your reply.

image

you mean maxResources?I tried changing it to 1 but it became very slow. include select.

Will database is locked exist between reading and writing? Can add a write lock?

kekxv avatar Apr 17 '24 01:04 kekxv