M
M
moveOn2021-03-10 20:57:59
PHP
moveOn, 2021-03-10 20:57:59

How to deal with sqllite in concurrent queries?

I can't figure out how to do this. All the time I stumble either on the data base is locked, or either returns the data or not. I tried to catch the error with an exception and reconnect - it goes into an eternal loop. I guessed to close the connection, open a new one and only then reconnect - it seems to work, but sometimes it returns an empty database, although the database is intact and the next requests return normally. I tried transactions, wal log ... Please share your experience or an example of how to connect, to ensure that you wait for the database to be released, block it for everything, do what I need (read, write), close and release the database. Don't care about performance. Recording is very rare.

Thanks for answers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-03-10
@hottabxp

Please share your experience or example
Use better tools like MySQL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question