Replies: 1 comment
-
Keep in mind that this driver only exposes the capabilities of SQLite in Java, you can check the SQLite documentation for details on the feature itself: https://www.sqlite.org/c3ref/busy_handler.html By default SQLite will retry transactions when there is a lock, as only a single writer can write at the same time (when using the default journal mode). You can set the busy timeout to change the limit for those retries. Note that in case SQLite detects a deadlock, the busy handlers are skipped, and SQLITE_BUSY is returned directly. Your question would be best suited for StackOverflow to be honest. You can also check on using WAL mode. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am writing a sqlite application that is multiprocess. Specifically, external applications (e.g. python/nodejs web apps) are going to be inserting rows into sqlite, and the java app will be reading those rows, performing some work on them, and then deleting the events. Sqlite is kind of treated like a queue in this respect.
What I want to know is, does this require implementing a
BusyHandler
? There doesn't seem to be any documentation on what the handler is used for, and my connection is initialized like so:despite this, I still seem to get
SQLITE_BUSY
exceptions that occur far before a 5 second timeout. Is this because I need to manually implement the thread sleeping via a BusyHandler? Some other possible pertinent information is that this is a vertx application, and there is a vertx jdbc driver that I could possibly use on top of this library to handle asynchronous sleeping https://vertx.io/docs/vertx-jdbc-client/java/Beta Was this translation helpful? Give feedback.
All reactions